You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve been using the Verify library in several tests created with MSTEST. In one of these tests, I’ve set up a .json result file by adding a setting into the class initializer as follows:
[ClassInitialize] public static void TestInitializer(TestContext context) { VerifierSettings.UseStrictJson(); }
The issue I’m encountering is that executing this test changes the way Verify works globally. This means that all subsequent tests that have a result file as a .txt file are unable to perform the comparison.
I’m looking for a solution where the behavior change isn’t global, but specific to the test, or a method to reset the default value after the test is executed.
Any guidance or suggestions would be greatly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I’ve been using the Verify library in several tests created with MSTEST. In one of these tests, I’ve set up a .json result file by adding a setting into the class initializer as follows:
[ClassInitialize] public static void TestInitializer(TestContext context) { VerifierSettings.UseStrictJson(); }
The issue I’m encountering is that executing this test changes the way Verify works globally. This means that all subsequent tests that have a result file as a .txt file are unable to perform the comparison.
I’m looking for a solution where the behavior change isn’t global, but specific to the test, or a method to reset the default value after the test is executed.
Any guidance or suggestions would be greatly appreciated.
Thank you in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions