Fixing dotnet-compile and dotnet-test unit tests. Also, fixing a potential NullRef in ProjectContext.

The compile unit test needed to be updated to mock out a new call to ICommand.WorkingDirectory.

The test unit test needed to account for build-base-path getting fully qualified.
This commit is contained in:
Eric Erhardt 2016-05-02 14:39:09 -05:00
parent 6249829e68
commit d52ea07934
3 changed files with 3 additions and 2 deletions

View file

@ -176,6 +176,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests
var projectJson = Path.Combine(TestAssetPath, "project.json");
var command = new Mock<ICommand>();
command.Setup(c => c.Execute()).Returns(new CommandResult());
command.Setup(c => c.WorkingDirectory(It.IsAny<string>())).Returns(() => command.Object);
command.Setup(c => c.OnErrorLine(It.IsAny<Action<string>>())).Returns(() => command.Object);
command.Setup(c => c.OnOutputLine(It.IsAny<Action<string>>())).Returns(() => command.Object);
var commandFactory = new Mock<ICommandFactory>();