Fix tool package unit test to use the correct resource string.
The `GivenFailedPackageInstallWhenRunWithPackageIdItShouldFail` test should match against `ToolInstallationFailedWithRestoreGuidance` and not `ToolInstallationFailed`. This passed prior to the LOC update because the former started with the latter and a "contains" match was being performed.
This commit is contained in:
parent
47a65f258a
commit
faa7a7e47c
1 changed files with 6 additions and 3 deletions
|
@ -175,9 +175,11 @@ namespace Microsoft.DotNet.Tests.Commands
|
|||
[Fact]
|
||||
public void GivenFailedPackageInstallWhenRunWithPackageIdItShouldFail()
|
||||
{
|
||||
const string ErrorMessage = "Simulated error";
|
||||
|
||||
var toolPackageInstaller =
|
||||
CreateToolPackageInstaller(
|
||||
installCallback: () => throw new ToolPackageException("Simulated error"));
|
||||
installCallback: () => throw new ToolPackageException(ErrorMessage));
|
||||
|
||||
var installCommand = new ToolInstallCommand(
|
||||
_appliedCommand,
|
||||
|
@ -191,8 +193,9 @@ namespace Microsoft.DotNet.Tests.Commands
|
|||
|
||||
a.ShouldThrow<GracefulException>().And.Message
|
||||
.Should().Contain(
|
||||
"Simulated error" + Environment.NewLine
|
||||
+ string.Format(LocalizableStrings.ToolInstallationFailed, PackageId));
|
||||
ErrorMessage +
|
||||
Environment.NewLine +
|
||||
string.Format(LocalizableStrings.ToolInstallationFailedWithRestoreGuidance, PackageId));
|
||||
|
||||
_fileSystem.Directory.Exists(Path.Combine(PathToPlacePackages, PackageId)).Should().BeFalse();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue