Merge pull request #2538 from sokket/nrefix
Fixing #2480 to produce an InvalidProjectException for invalid projects
This commit is contained in:
commit
18ae4d4791
4 changed files with 45 additions and 0 deletions
|
@ -294,5 +294,26 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
|
|||
var command = new TestCommand(Path.Combine(publishedDir.FullName, outputExe));
|
||||
command.Execute("").Should().ExitWith(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PublishFailsWhenProjectRootIsEmpty()
|
||||
{
|
||||
using (var dir = new DisposableDirectory(Temp))
|
||||
{
|
||||
var command = new TestCommand("dotnet");
|
||||
command.Execute($"publish {dir.Path}").Should().Fail();
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PublishFailsWhenProjectJsonDoesNotExist()
|
||||
{
|
||||
using (var dir = new DisposableDirectory(Temp))
|
||||
{
|
||||
var command = new TestCommand("dotnet");
|
||||
string temp = Path.Combine(dir.Path, "project.json");
|
||||
command.Execute($"publish {temp}").Should().Fail();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue