Skip to content

Decimal separator inconsistency (MarkupMatches) causes test failure when pushed to Azure #1012

Answered by egil
BenjoWatcher asked this question in Q&A
Discussion options

You must be logged in to vote

Converted this to a QA discussion since it is not a bug/problem in bUnit.

When you run your tests, you can specify the "culture" the runtime should be using, so it is independent of the operating system you are using.

How to approach this depends on the testing framework you are using. For example, if you're using xUnit, you can add the UseCultureAttribute to your project, as defined here:

https://github.com/xunit/samples.xunit/blob/master/UseCulture/UseCultureAttribute.cs

To use it:

[Fact]
[UseCulture("en-US")]
public void MyTest()
{
    // ...
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BenjoWatcher
Comment options

Answer selected by BenjoWatcher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1011 on March 02, 2023 12:02.