AnnoDesigner / anno-designer

A building layout designer for Ubisoft's Anno-series.
MIT License
207 stars 32 forks source link

Tests do not require specific culture #428

Closed FroggieFrog closed 2 years ago

FroggieFrog commented 2 years ago

This PR fixes issue #425. The specific culture aware attributes were copied from the xunit repo: CultureAwareTesting. Tests that are decorated with [CulturedFact] will be run with the CultureInfos en-US and de-DE by default. For example the decimal separator in those cultures is different (. vs ,). Other cultures could be used by specifing them in the attribute: [CulturedFact("fr-FR", "es-ES")]

As mentioned in the xunit repo it is advisable to disable the parallelization for collections that contain this attribute. (culture is set per thread) The PR takes care of that and has a corresponding comment.