Fix tests
Missing namespace Re-enable dotnet-nuget unit tests
This commit is contained in:
parent
336ecc0e89
commit
ae4a690724
4 changed files with 39 additions and 7 deletions
|
@ -4,6 +4,7 @@
|
|||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
using FluentAssertions;
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.DotNet.Tests
|
||||
{
|
||||
|
@ -18,8 +19,7 @@ namespace Microsoft.DotNet.Tests
|
|||
|
||||
new TestCommand("dotnet") { WorkingDirectory = rootPath }
|
||||
.Execute("new --type xunittest")
|
||||
.Should()
|
||||
.Pass();
|
||||
.Should().Pass();
|
||||
|
||||
new TestCommand("dotnet") { WorkingDirectory = rootPath }
|
||||
.Execute("restore")
|
||||
|
|
|
@ -42,14 +42,14 @@ namespace Microsoft.DotNet.Tools.Run.Tests
|
|||
{
|
||||
// Arrange
|
||||
string[] receivedArgs = null;
|
||||
var testCommandRunner = new Mock<INuGetCommandRunner>();
|
||||
var testCommandRunner = new Mock<ICommandRunner>();
|
||||
testCommandRunner
|
||||
.Setup(x => x.Run(It.IsAny<string[]>()))
|
||||
.Callback<string[]>(s => receivedArgs = s)
|
||||
.Returns(0);
|
||||
|
||||
// Act
|
||||
var returned = NuGetCommand.RunCommand(inputArgs, testCommandRunner.Object);
|
||||
var returned = NuGetCommand.Run(inputArgs, testCommandRunner.Object);
|
||||
|
||||
// Assert
|
||||
receivedArgs.Should().BeEquivalentTo(inputArgs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue