Skip to content

Commit

Permalink
set invariant culture before executing any test
Browse files Browse the repository at this point in the history
  • Loading branch information
SWeini committed Oct 20, 2024
1 parent 047b1fe commit 621f47a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Yafc.Model.Tests/Data/DataUtils.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using System;
using System.Globalization;
using System.Threading;
using Xunit;

namespace Yafc.Model.Data.Tests;

public class DataUtilsTests {
public DataUtilsTests() {
Project.current = new();
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
}

[Fact]
Expand Down
16 changes: 16 additions & 0 deletions Yafc.Model.Tests/PrepareForTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Globalization;
using System.Threading;
using Xunit;
using Xunit.Abstractions;
using Xunit.Sdk;
using Yafc.Model.Tests;

[assembly: TestFramework("Yafc.Model.Tests." + nameof(PrepareForTests), "Yafc.Model.Tests")]

namespace Yafc.Model.Tests;
public class PrepareForTests : XunitTestFramework {
public PrepareForTests(IMessageSink messageSink)
: base(messageSink) {
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
}
}

0 comments on commit 621f47a

Please sign in to comment.