Skip to content

Commit 76fe22d

Browse files
committed
Fix all of the tests
We don't need a verbose message that's a copy of the non verbose message each time....
1 parent 3979190 commit 76fe22d

File tree

4 files changed

+2
-21
lines changed

4 files changed

+2
-21
lines changed

test/dotnet.Tests/CommandTests/Tool/Install/ToolInstallLocalCommandTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,6 @@ public void GivenNoManifestFileItShouldThrowAndContainNoManifestGuide()
169169
a.Should().Throw<GracefulException>()
170170
.And.Message.Should()
171171
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
172-
173-
a.Should().Throw<GracefulException>()
174-
.And.VerboseMessage.Should().Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
175172
}
176173

177174
[Fact]

test/dotnet.Tests/CommandTests/Tool/Uninstall/ToolUninstallLocalCommandTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ public void GivenNoManifestFileItShouldThrow()
7070
a.Should().Throw<GracefulException>()
7171
.And.Message.Should()
7272
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
73-
74-
a.Should().Throw<GracefulException>()
75-
.And.VerboseMessage.Should().Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
7673
}
7774

7875
[Fact]

test/dotnet.Tests/CommandTests/Tool/Update/ToolUpdateLocalCommandTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public void GivenNoManifestFileItShouldThrow()
237237
_fileSystem.File.Delete(_manifestFilePath);
238238
Action a = () => _defaultToolUpdateLocalCommand.Execute().Should().Be(0);
239239

240-
a.Should().Throw<ToolManifestCannotBeFoundException>().And.VerboseMessage.Should()
240+
a.Should().Throw<ToolManifestCannotBeFoundException>().And.Message.Should()
241241
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
242242
}
243243

test/dotnet.Tests/ToolManifestTests/ToolManifestFinderTests.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,7 @@ public void WhenCalledWithNonExistsFilePathItThrows()
254254

255255
Action a = () => toolManifest.Find(new FilePath(Path.Combine(_testDirectoryRoot, "non-exists")));
256256
a.Should().Throw<ToolManifestCannotBeFoundException>().And.Message.Should()
257-
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
258-
259-
a.Should().Throw<ToolManifestCannotBeFoundException>().And.VerboseMessage.Should()
260-
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""))
261-
.And.Contain(
257+
.Contain(string.Format(CliStrings.CannotFindAManifestFile, "")).And.Contain(
262258
Path.Combine(_testDirectoryRoot, "non-exists"),
263259
"the specificied manifest file name is in the 'searched list'");
264260
}
@@ -275,9 +271,6 @@ public void GivenNoManifestFileItThrows()
275271
Action a = () => toolManifest.Find();
276272
a.Should().Throw<ToolManifestCannotBeFoundException>().And.Message.Should()
277273
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
278-
279-
a.Should().Throw<ToolManifestCannotBeFoundException>().And.VerboseMessage.Should()
280-
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
281274
}
282275

283276
[Fact]
@@ -445,9 +438,6 @@ public void GivenNoManifestFileWhenFindContainPackageIdItThrows()
445438

446439
a.Should().Throw<ToolManifestCannotBeFoundException>().And.Message.Should()
447440
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
448-
449-
a.Should().Throw<ToolManifestCannotBeFoundException>().And.VerboseMessage.Should()
450-
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
451441
}
452442

453443
[Fact]
@@ -741,9 +731,6 @@ public void GivenManifestFileOnSameDirectoryItThrowsWhenTheManifestFileCannotBeF
741731

742732
a.Should().Throw<ToolManifestCannotBeFoundException>().And.Message.Should()
743733
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
744-
745-
a.Should().Throw<ToolManifestCannotBeFoundException>().And.VerboseMessage.Should()
746-
.Contain(string.Format(CliStrings.CannotFindAManifestFile, ""));
747734
}
748735

749736
[Fact]

0 commit comments

Comments
 (0)