-
-
Notifications
You must be signed in to change notification settings - Fork 145
/
InstanceFileAppenderTests.cs
58 lines (46 loc) · 1.25 KB
/
InstanceFileAppenderTests.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
public class InstanceFileAppenderTests
{
VerifySettings settings;
public InstanceFileAppenderTests()
{
settings = new();
settings.AppendContentAsFile("appendedFile");
}
[Fact]
public Task Text() =>
Verify("Foo", settings);
[Fact]
public Task WithName() =>
Verify("Foo", settings)
.AppendContentAsFile("extra content", name: "theName");
#region AppendFile
[Fact]
public Task AppendFile() =>
Verify("Foo", settings)
.AppendFile("sample.png");
#endregion
#region AppendContentAsFile
[Fact]
public Task AppendContentAsFile() =>
Verify("Foo")
.AppendContentAsFile("extra content");
#endregion
[Fact]
public Task WithScrubbing() =>
Verify("Foo")
.AppendContentAsFile(
"""
line1
line2
line3
""")
.ScrubLinesContaining("line2");
[Fact]
public Task TextBytesFluent() =>
Verify("Foo")
.AppendContentAsFile("appendedFile"u8.ToArray());
[Fact]
public Task TextStreamFluent() =>
Verify("Foo")
.AppendFile(new MemoryStream("appendedFile"u8.ToArray()));
}