Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
64 changes: 48 additions & 16 deletions test/dotnet-new.IntegrationTests/DotnetNewSearchTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -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'")]
Expand All @@ -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")]
Expand Down Expand Up @@ -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")]
Expand 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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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#")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 =
Expand All @@ -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")
Expand Down
8 changes: 6 additions & 2 deletions test/dotnet-new.IntegrationTests/DotnetNewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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")]
Expand Down