Skip to content

Latest commit

 

History

History
148 lines (127 loc) · 4.17 KB

explicit-targets.md

File metadata and controls

148 lines (127 loc) · 4.17 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

TUnit

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

snippet source | anchor

Result

{
  Property: Value
}

snippet source | anchor

Raw target value

snippet source | anchor