-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
Describe the bug
Currently, the arguments of [DataRow] tests are transformed into string values using the actual OS culture. Therefore, the file paths may vary depending on the system locale.
To Reproduce
[TestClass]
public sealed class Test1
{
[DataTestMethod]
[DataRow(1.5)]
public void TestMethod1(double value)
{
value.MatchSnapshot();
}
}Expected behavior
The snapshot file path should be identical across all systems.
Currently, on a German system it becomes something like: Test1.TestMethod1_1,5.snap
whereas on an English system it is: Test1.TestMethod1_1.5.snap
Suggested Solution
Use Invariant Culture when converting values to strings to ensure consistent file paths across different locales.
This is a breaking change, though.
Desktop (please complete the following information):
- OS: Win 11
- Version Snapshooter.MsTest V 1.01
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels