Merge branch 'rel/1.0.0' into slntest

This commit is contained in:
Piotr Puszkiewicz 2017-01-11 17:37:46 -08:00 committed by GitHub
commit c0b73e4b5f
11 changed files with 52 additions and 26 deletions

View file

@ -57,16 +57,16 @@
<Version>4.1.1</Version>
</PackageReference>
<PackageReference Include="NuGet.Versioning">
<Version>4.0.0-rc3</Version>
<Version>$(CLI_NuGet_Version)</Version>
</PackageReference>
<PackageReference Include="NuGet.Packaging">
<Version>4.0.0-rc3</Version>
<Version>$(CLI_NuGet_Version)</Version>
</PackageReference>
<PackageReference Include="NuGet.Frameworks">
<Version>4.0.0-rc3</Version>
<Version>$(CLI_NuGet_Version)</Version>
</PackageReference>
<PackageReference Include="NuGet.ProjectModel">
<Version>4.0.0-rc3</Version>
<Version>$(CLI_NuGet_Version)</Version>
</PackageReference>
<PackageReference Include="moq.netcore">
<Version>4.4.0-beta8</Version>

View file

@ -72,5 +72,25 @@ namespace Microsoft.DotNet.Cli.Build.Tests
.Should().Pass()
.And.HaveStdOutContaining("Hello World");
}
[Fact]
public void ItPrintsBuildSummary()
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssets.Get(testAppName)
.CreateInstance(testAppName)
.WithSourceFiles()
.WithRestoreFiles();
string expectedBuildSummary = @"Build succeeded.
0 Warning(s)
0 Error(s)";
var cmd = new BuildCommand()
.WithWorkingDirectory(testInstance.Root)
.ExecuteWithCapturedOutput();
cmd.Should().Pass();
cmd.StdOut.Should().ContainVisuallySameFragment(expectedBuildSummary);
}
}
}

View file

@ -7,6 +7,7 @@ using Microsoft.DotNet.TestFramework;
using Microsoft.DotNet.Tools.Test.Utilities;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using Xunit;
namespace Microsoft.DotNet.Migration.Tests
@ -37,11 +38,11 @@ namespace Microsoft.DotNet.Migration.Tests
"PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj");
}
private void MigrateAndBuild(string groupName, string projectName)
private void MigrateAndBuild(string groupName, string projectName, [CallerMemberName] string callingMethod = "", string identifier = "")
{
var projectDirectory = TestAssets
.Get(groupName, projectName)
.CreateInstance()
.CreateInstance(callingMethod: callingMethod, identifier: identifier)
.WithSourceFiles()
.Root;