Skip to content

Commit

Permalink
Update MarkdownProcessorTests.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jul 6, 2024
1 parent 5bd2b16 commit 6586c89
Showing 1 changed file with 19 additions and 48 deletions.
67 changes: 19 additions & 48 deletions src/Tests/MarkdownProcessor/MarkdownProcessorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ public Task Missing_endInclude()
return SnippetVerifier.VerifyThrows(
DocumentConvention.InPlaceOverwrite,
content,
includes:
[
Include.Build("theKey", [], Path.GetFullPath("thePath"))
]);
includes: [Include.Build("theKey", [], Path.GetFullPath("thePath"))]);
}

[Fact]
Expand All @@ -41,10 +38,7 @@ public Task WithEmptyMultiLineInclude_Overwrite()
return SnippetVerifier.Verify(
DocumentConvention.InPlaceOverwrite,
content,
includes: new[]
{
Include.Build("theKey", lines, Path.GetFullPath("thePath"))
});
includes: [Include.Build("theKey", lines, Path.GetFullPath("thePath"))]);
}

[Fact]
Expand All @@ -69,10 +63,7 @@ public Task WithMultiLineInclude_Overwrite()
return SnippetVerifier.Verify(
DocumentConvention.InPlaceOverwrite,
content,
includes: new[]
{
Include.Build("theKey", lines, Path.GetFullPath("thePath"))
});
includes: [Include.Build("theKey", lines, Path.GetFullPath("thePath"))]);
}

[Fact]
Expand All @@ -94,10 +85,7 @@ public Task WithSingleInclude_Overwrite()
return SnippetVerifier.Verify(
DocumentConvention.InPlaceOverwrite,
content,
includes: new[]
{
Include.Build("theKey", lines, Path.GetFullPath("thePath"))
});
includes: [Include.Build("theKey", lines, Path.GetFullPath("thePath"))]);
}

[Fact]
Expand All @@ -119,10 +107,7 @@ public Task WithSingleInclude()
return SnippetVerifier.Verify(
DocumentConvention.SourceTransform,
content,
includes: new[]
{
Include.Build("theKey", lines, Path.GetFullPath("thePath"))
});
includes: [Include.Build("theKey", lines, Path.GetFullPath("thePath"))]);
}

[Fact]
Expand All @@ -142,11 +127,11 @@ public Task WithMixedCaseInclude()
return SnippetVerifier.Verify(
DocumentConvention.SourceTransform,
content,
includes: new[]
{
includes:
[
Include.Build("theKey", ["theValue1"], Path.GetFullPath("thePath")),
Include.Build("TheKey", ["theValue2"], Path.GetFullPath("thePath")),
});
Include.Build("TheKey", ["theValue2"], Path.GetFullPath("thePath"))
]);
}

[Fact]
Expand Down Expand Up @@ -185,7 +170,8 @@ public Task WithMixedCaseSnippet()
return SnippetVerifier.Verify(
DocumentConvention.SourceTransform,
content,
snippets: [
snippets:
[
SnippetBuild("cs", "theKey"),
SnippetBuild("cs", "TheKey"),
]);
Expand Down Expand Up @@ -274,10 +260,10 @@ public Task WithDoubleInclude()
return SnippetVerifier.Verify(
DocumentConvention.SourceTransform,
content,
includes: new[]
{
includes:
[
Include.Build("theKey", lines, Path.GetFullPath("thePath"))
});
]);
}

[Fact]
Expand All @@ -301,10 +287,7 @@ public Task WithEmptyMultipleInclude()
return SnippetVerifier.Verify(
DocumentConvention.SourceTransform,
content,
includes: new[]
{
Include.Build("theKey", lines, Path.GetFullPath("thePath"))
});
includes: [Include.Build("theKey", lines, Path.GetFullPath("thePath"))]);
}

[Fact]
Expand All @@ -328,10 +311,7 @@ public Task WithMultipleInclude()
return SnippetVerifier.Verify(
DocumentConvention.SourceTransform,
content,
includes: new[]
{
Include.Build("theKey", lines, Path.GetFullPath("thePath"))
});
includes: [Include.Build("theKey", lines, Path.GetFullPath("thePath"))]);
}

[Fact]
Expand Down Expand Up @@ -623,10 +603,7 @@ some other text
DocumentConvention.SourceTransform,
content,
availableSnippets,
includes: new[]
{
Include.Build("theKey", lines, "thePath")
});
includes: [Include.Build("theKey", lines, "thePath")]);
}

[Fact]
Expand Down Expand Up @@ -654,10 +631,7 @@ some other text
DocumentConvention.SourceTransform,
content,
availableSnippets,
includes: new[]
{
Include.Build("theKey", lines, "thePath")
});
includes: [Include.Build("theKey", lines, "thePath")]);
}

[Fact]
Expand Down Expand Up @@ -685,10 +659,7 @@ some other text
DocumentConvention.SourceTransform,
content,
availableSnippets,
includes: new[]
{
Include.Build("theKey", lines, "thePath")
});
includes: [Include.Build("theKey", lines, "thePath")]);
}

static Snippet SnippetBuild(string language, string key) =>
Expand Down

0 comments on commit 6586c89

Please sign in to comment.