Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.49 KB

append-file.md

File metadata and controls

48 lines (36 loc) · 1.49 KB

AppendFile

Allows extra files to be verified in addition to the primary target.

AppendFile

[Fact]
public Task AppendFile() =>
    Verify("Foo", settings)
        .AppendFile("sample.png");

snippet source | anchor

Will result in two files being verified:

  • Tests.AppendFile#00.verified.txt containing Foo
  • Tests.AppendFile#sample.verified.png

AppendContentAsFile

[Fact]
public Task AppendContentAsFile() =>
    Verify("Foo")
        .AppendContentAsFile("extra content");

snippet source | anchor

Will result in two files being verified:

  • Tests.AppendContentAsFile#00.verified.txt containing Foo
  • Tests.AppendContentAsFile#01.verified.txt containing extra content