diff --git a/test/dotnet-new.IntegrationTests/DotnetNewDetailsTest.Approval.cs b/test/dotnet-new.IntegrationTests/DotnetNewDetailsTest.Approval.cs index 9d4d2564820c..d358deff23e6 100644 --- a/test/dotnet-new.IntegrationTests/DotnetNewDetailsTest.Approval.cs +++ b/test/dotnet-new.IntegrationTests/DotnetNewDetailsTest.Approval.cs @@ -28,7 +28,9 @@ public Task CanDisplayDetails_RemotePackage_NuGetFeedWithVersion() return Verify(commandResult.StdOut); } - [Fact] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Fact(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped public Task CanDisplayDetails_RemotePackage_NuGetFeedNoVersion() { var folder = CreateTemporaryFolder(); diff --git a/test/dotnet-new.IntegrationTests/DotnetNewSearchTests.Approval.cs b/test/dotnet-new.IntegrationTests/DotnetNewSearchTests.Approval.cs index a8f1cc32487e..9868eda123ef 100644 --- a/test/dotnet-new.IntegrationTests/DotnetNewSearchTests.Approval.cs +++ b/test/dotnet-new.IntegrationTests/DotnetNewSearchTests.Approval.cs @@ -23,7 +23,9 @@ public Task CannotExecuteEmptyCriteria(string testCase) .DisableRequireUniquePrefix(); } - [Fact] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Fact(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped public Task CanShowMessageInCaseShortNameConflict() { string customHivePath = CreateTemporaryFolder(folderName: "Home"); diff --git a/test/dotnet-new.IntegrationTests/DotnetNewSearchTests.cs b/test/dotnet-new.IntegrationTests/DotnetNewSearchTests.cs index da8369cab4c7..c713cdbb62c4 100644 --- a/test/dotnet-new.IntegrationTests/DotnetNewSearchTests.cs +++ b/test/dotnet-new.IntegrationTests/DotnetNewSearchTests.cs @@ -16,7 +16,9 @@ public DotnetNewSearchTests(SharedHomeDirectory sharedHome, ITestOutputHelper lo _log = log; } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("console --search")] [InlineData("--search console")] [InlineData("search console")] @@ -57,7 +59,9 @@ public void CannotExecuteSearchWithShortCriteria(string testCase) .And.HaveStdErrContaining("Search failed: template name is too short, minimum 2 characters are required."); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("--search fofofo", "'fofofo'")] [InlineData("search fofofo", "'fofofo'")] [InlineData("search fofofo --type item", "'fofofo', --type='item'")] @@ -72,7 +76,9 @@ public void CanDisplayNoResults(string testCase, string criteria) .And.HaveStdErrContaining($"No templates found matching: {criteria}."); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("azure --search --columns author")] [InlineData("--search azure --columns author")] [InlineData("search azure --columns author")] @@ -101,7 +107,9 @@ public void ExamplePrefersMicrosoftPackage(string testCase) commandResult.Should().HaveStdOutContaining(ContainsOneOfInstallationCommands, "Checks if the output contains one of the expected installation commands"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("console --search --columns-all")] [InlineData("--columns-all --search console")] [InlineData("search console --columns-all")] @@ -128,7 +136,9 @@ public void CanShowAllColumns(string testCase) Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("console --search --columns tags --tag Common")] [InlineData("--search console --columns tags --tag Common")] [InlineData("search console --columns tags --tag Common")] @@ -159,7 +169,9 @@ public void CanFilterTags(string testCase) Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("--search --columns tags --tag Common")] [InlineData("--columns tags --search --tag Common")] [InlineData("search --columns tags --tag Common")] @@ -188,7 +200,9 @@ public void CanFilterTags_WithoutName(string testCase) Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("func --search --columns author --author micro")] [InlineData("--search func --columns author --author micro")] [InlineData("search func --columns author --author micro")] @@ -220,7 +234,9 @@ public void CanFilterAuthor(string testCase) Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("--search --columns author --author micro")] [InlineData("search --columns author --author micro")] public void CanFilterAuthor_WithoutName(string testCase) @@ -251,7 +267,9 @@ public void CanFilterAuthor_WithoutName(string testCase) Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("console --search --columns language --language Q#")] [InlineData("--search console --columns language --language Q#")] [InlineData("search console --columns language --language Q#")] @@ -283,7 +301,9 @@ public void CanFilterLanguage(string testCase) Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("--search --columns language --language Q#", "--language")] [InlineData("search --columns language --language Q#", "--language")] [InlineData("--search --columns language -lang Q#", "-lang")] @@ -314,7 +334,9 @@ public void CanFilterLanguage_WithoutName(string testCase, string optionName) Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("console --search --columns type --type item")] [InlineData("--search console --columns type --type item")] [InlineData("search console --columns type --type item")] @@ -346,7 +368,9 @@ public void CanFilterType(string testCase) Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("--search --columns type --type item")] [InlineData("search --columns type --type item")] public void CanFilterType_WithoutName(string testCase) @@ -376,7 +400,9 @@ public void CanFilterType_WithoutName(string testCase) Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("console --search --package core")] [InlineData("--search console --package core")] [InlineData("search console --package core")] @@ -408,7 +434,9 @@ public void CanFilterPackage(string testCase) Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values"); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("--search --package core")] [InlineData("search --package core")] public void CanFilterPackage_WithoutName(string testCase) @@ -757,7 +785,9 @@ public void CannotSearchOnParseError(string command, string invalidArguments, st } } - [Fact] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Fact(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped public void CanShowDeprecationMessage_WhenLegacyCommandIsUsed() { const string deprecationMessage = @@ -776,7 +806,9 @@ public void CanShowDeprecationMessage_WhenLegacyCommandIsUsed() Assert.StartsWith(deprecationMessage, commandResult.StdOut); } - [Fact] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Fact(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped public void DoNotShowDeprecationMessage_WhenNewCommandIsUsed() { CommandResult commandResult = new DotnetNewCommand(_log, "search", "console") diff --git a/test/dotnet-new.IntegrationTests/DotnetNewTests.cs b/test/dotnet-new.IntegrationTests/DotnetNewTests.cs index 716d7d5a0f7e..bd674f7c6f38 100644 --- a/test/dotnet-new.IntegrationTests/DotnetNewTests.cs +++ b/test/dotnet-new.IntegrationTests/DotnetNewTests.cs @@ -61,7 +61,9 @@ public void CanUseQuietMode_ViaEnvVar() .And.NotHaveStdOut(); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("-v", "m")] [InlineData("-v", "minimal")] [InlineData("--verbosity", "m")] @@ -81,7 +83,9 @@ public Task CanUseMinimalMode(string optionName, string optionValue) .DisableRequireUniquePrefix(); } - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/51147")] +#pragma warning restore xUnit1004 // Test methods should not be skipped [InlineData("-v", "n")] [InlineData("-v", "normal")] [InlineData("--verbosity", "n")]