<!-- GENERATED FILE - DO NOT EDIT This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets). Source File: /docs/mdsource/explicit-targets.source.md To change this file edit the source file and then run MarkdownSnippets. --> # Passing explicit Targets * `target` treated as a string or serialized. * [Converters](/docs/converter.md) are not executed. * Explicit `Target`s can be passed in. ## NUnit <!-- snippet: ExplicitTargetsNunit --> <a id='snippet-ExplicitTargetsNunit'></a> ```cs [Test] public Task WithTargets() => Verify( new { Property = "Value" }, [ new Target( extension: "txt", data: "Raw target value", name: "targetName") ]); ``` <sup><a href='/src/Verify.NUnit.Tests/Tests.cs#L33-L49' title='Snippet source file'>snippet source</a> | <a href='#snippet-ExplicitTargetsNunit' title='Start of snippet'>anchor</a></sup> <!-- endSnippet --> ## Xunit <!-- snippet: ExplicitTargetsXunitV3 --> <a id='snippet-ExplicitTargetsXunitV3'></a> ```cs [Fact] public Task WithTargets() => Verify( new { Property = "Value" }, [ new( extension: "txt", data: "Raw target value", name: "targetName") ]); ``` <sup><a href='/src/Verify.XunitV3.Tests/Tests.cs#L39-L55' title='Snippet source file'>snippet source</a> | <a href='#snippet-ExplicitTargetsXunitV3' title='Start of snippet'>anchor</a></sup> <!-- endSnippet --> ## Fixie <!-- snippet: ExplicitTargetsFixie --> <a id='snippet-ExplicitTargetsFixie'></a> ```cs public Task WithTargets() => Verify( new { Property = "Value" }, [ new( extension: "txt", data: "Raw target value", name: "targetName") ]); ``` <sup><a href='/src/Verify.Fixie.Tests/Tests.cs#L26-L41' title='Snippet source file'>snippet source</a> | <a href='#snippet-ExplicitTargetsFixie' title='Start of snippet'>anchor</a></sup> <!-- endSnippet --> ## MsTest <!-- snippet: ExplicitTargetsMSTest --> <a id='snippet-ExplicitTargetsMSTest'></a> ```cs [TestMethod] public Task WithTargets() => Verify( target: new { Property = "Value" }, rawTargets: [ new( extension: "txt", data: "Raw target value", name: "targetName") ]); ``` <sup><a href='/src/Verify.MSTest.Tests/Tests.cs#L125-L142' title='Snippet source file'>snippet source</a> | <a href='#snippet-ExplicitTargetsMSTest' title='Start of snippet'>anchor</a></sup> <!-- endSnippet --> ## TUnit <!-- snippet: ExplicitTargetsTUnit --> <a id='snippet-ExplicitTargetsTUnit'></a> ```cs [Test] public Task WithTargets() => Verify( new { Property = "Value" }, [ new Target( extension: "txt", data: "Raw target value", name: "targetName") ]); ``` <sup><a href='/src/Verify.TUnit.Tests/Tests.cs#L28-L44' title='Snippet source file'>snippet source</a> | <a href='#snippet-ExplicitTargetsTUnit' title='Start of snippet'>anchor</a></sup> <!-- endSnippet --> ## Result <!-- snippet: Verify.MSTest.Tests/Tests.WithTargets.verified.txt --> <a id='snippet-Verify.MSTest.Tests/Tests.WithTargets.verified.txt'></a> ```txt { Property: Value } ``` <sup><a href='/src/Verify.MSTest.Tests/Tests.WithTargets.verified.txt#L1-L3' title='Snippet source file'>snippet source</a> | <a href='#snippet-Verify.MSTest.Tests/Tests.WithTargets.verified.txt' title='Start of snippet'>anchor</a></sup> <!-- endSnippet --> <!-- snippet: Verify.MSTest.Tests/Tests.WithTargets#targetName.verified.txt --> <a id='snippet-Verify.MSTest.Tests/Tests.WithTargets#targetName.verified.txt'></a> ```txt Raw target value ``` <sup><a href='/src/Verify.MSTest.Tests/Tests.WithTargets#targetName.verified.txt#L1-L1' title='Snippet source file'>snippet source</a> | <a href='#snippet-Verify.MSTest.Tests/Tests.WithTargets#targetName.verified.txt' title='Start of snippet'>anchor</a></sup> <!-- endSnippet -->