forked from VerifyTests/Verify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ScrubberLevelsSample.cs
35 lines (28 loc) · 863 Bytes
/
ScrubberLevelsSample.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
namespace TheTests;
#region ScrubberLevelsSampleMSTest
[TestClass]
public class ScrubberLevelsSample :
VerifyBase
{
VerifySettings classLevelSettings;
public ScrubberLevelsSample()
{
classLevelSettings = new();
classLevelSettings.AddScrubber(_ => _.Replace("Three", "C"));
}
[TestMethod]
public Task Simple()
{
var settings = new VerifySettings(classLevelSettings);
settings.AddScrubber(_ => _.Replace("Two", "B"));
return Verify("One Two Three", settings);
}
[TestMethod]
public Task SimpleFluent() =>
Verify("One Two Three", classLevelSettings)
.AddScrubber(_ => _.Replace("Two", "B"));
[AssemblyInitialize]
public static void Setup(TestContext testContext) =>
VerifierSettings.AddScrubber(_ => _.Replace("One", "A"));
}
#endregion