Skip to content

Commit

Permalink
Ignore diagnostics during MVC project loading test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeRobich committed Mar 1, 2022
1 parent 4a64248 commit 0389cec
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/MSBuild/MSBuildWorkspaceLoaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ public MSBuildWorkspaceLoaderTests(ITestOutputHelper output)
// [InlineData("wpfusercontrollib")]
// [InlineData("wpflib")]
// [InlineData("wpfcustomcontrollib")]
public async Task CSharpTemplateProject_WindowsOnly_LoadWithNoDiagnostics(string templateName)
public async Task CSharpTemplateProject_WindowsOnly_LoadWithNoDiagnostics(string templateName, string ignoredDiagnostics = "")
{
await AssertTemplateProjectLoadsCleanlyAsync(templateName, LanguageNames.CSharp);
await AssertTemplateProjectLoadsCleanlyAsync(templateName, LanguageNames.CSharp, ignoredDiagnostics.Split(";", StringSplitOptions.TrimEntries));
}

[MSBuildTheory]
[InlineData("web")]
[InlineData("grpc")]
[InlineData("webapi")]
[InlineData("razor")]
[InlineData("mvc")]
[InlineData("mvc", "CS8602")]
[InlineData("angular")]
[InlineData("react")]
// Skip="https://github.com/dotnet/format/issues/1402"
Expand All @@ -59,20 +59,20 @@ public async Task CSharpTemplateProject_WindowsOnly_LoadWithNoDiagnostics(string
[InlineData("razorclasslib")]
[InlineData("worker")]
[InlineData("xunit")]
public async Task CSharpTemplateProject_LoadWithNoDiagnostics(string templateName)
public async Task CSharpTemplateProject_LoadWithNoDiagnostics(string templateName, string ignoredDiagnostics = "")
{
await AssertTemplateProjectLoadsCleanlyAsync(templateName, LanguageNames.CSharp);
await AssertTemplateProjectLoadsCleanlyAsync(templateName, LanguageNames.CSharp, ignoredDiagnostics.Split(";", StringSplitOptions.TrimEntries));
}

[MSBuildTheory]
[InlineData("classlib")]
[InlineData("console")]
[InlineData("mstest")]
[InlineData("nunit")]
[InlineData("xunit")]
public async Task VisualBasicTemplateProject_LoadWithNoDiagnostics(string templateName)
[InlineData("classlib", "BC30002")]
[InlineData("console", "BC30002")]
[InlineData("mstest", "BC30002")]
[InlineData("nunit", "BC30002")]
[InlineData("xunit", "BC30002")]
public async Task VisualBasicTemplateProject_LoadWithNoDiagnostics(string templateName, string ignoredDiagnostics)
{
await AssertTemplateProjectLoadsCleanlyAsync(templateName, LanguageNames.VisualBasic, ignoredDiagnostics: new[] { "BC30002" });
await AssertTemplateProjectLoadsCleanlyAsync(templateName, LanguageNames.VisualBasic, ignoredDiagnostics.Split(";", StringSplitOptions.TrimEntries));
}

private async Task AssertTemplateProjectLoadsCleanlyAsync(string templateName, string languageName, string[] ignoredDiagnostics = null)
Expand Down

0 comments on commit 0389cec

Please sign in to comment.