Skip to content

Latest commit

 

History

History
125 lines (107 loc) · 3.59 KB

explicit-targets.md

File metadata and controls

125 lines (107 loc) · 3.59 KB

Passing explicit Targets

  • target treated as a string or serialized.
  • Converters are not executed.
  • Explicit Targets can be passed in.

NUnit

[Test]
public Task WithTargets() =>
    Verify(
        new
        {
            Property = "Value"
        },
        [
            new Target(
                extension: "txt",
                data: "Raw target value",
                name: "targetName")
        ]);

snippet source | anchor

Xunit

[Fact]
public Task WithTargets() =>
    Verify(
        new
        {
            Property = "Value"
        },
        [
            new(
                extension: "txt",
                data: "Raw target value",
                name: "targetName")
        ]);

snippet source | anchor

Fixie

public Task WithTargets() =>
    Verify(
        new
        {
            Property = "Value"
        },
        [
            new(
                extension: "txt",
                data: "Raw target value",
                name: "targetName")
        ]);

snippet source | anchor

MsTest

[TestMethod]
public Task WithTargets() =>
    Verify(
        target: new
        {
            Property = "Value"
        },
        rawTargets:
        [
            new(
                extension: "txt",
                data: "Raw target value",
                name: "targetName")
        ]);

snippet source | anchor

Result

{
  Property: Value
}

snippet source | anchor

Raw target value

snippet source | anchor