Add error message when tool is not restored
This commit is contained in:
parent
e37b055f1d
commit
ccfb4135c4
4 changed files with 55 additions and 1 deletions
|
@ -124,6 +124,20 @@ namespace Microsoft.DotNet.Tests
|
|||
.And.Pass();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ItShowsErrorWhenToolIsNotRestored()
|
||||
{
|
||||
var testInstance = TestAssets.Get("NonRestoredTestProjects", "AppWithNonExistingToolDependency")
|
||||
.CreateInstance()
|
||||
.WithSourceFiles();
|
||||
|
||||
new TestCommand("dotnet")
|
||||
.WithWorkingDirectory(testInstance.Root)
|
||||
.ExecuteWithCapturedOutput("nonexistingtool")
|
||||
.Should().Fail()
|
||||
.And.HaveStdErrContaining("Version for package `dotnet-nonexistingtool` could not be resolved.");
|
||||
}
|
||||
|
||||
// need conditional theories so we can skip on non-Windows
|
||||
//[Theory(Skip="https://github.com/dotnet/cli/issues/4514")]
|
||||
//[MemberData("DependencyToolArguments")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue