Add test for MSBuild End to End.
This commit is contained in:
parent
f0afc7eb79
commit
72c59c4d05
5 changed files with 111 additions and 31 deletions
46
test/EndToEnd/GivenDotNetUsesMSBuild.cs
Normal file
46
test/EndToEnd/GivenDotNetUsesMSBuild.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.Tests.EndToEnd
|
||||
{
|
||||
public class GivenDotNetUsesMSBuild : TestBase
|
||||
{
|
||||
[Fact]
|
||||
public void ItCanNewRestoreBuildRunMSBuildProject()
|
||||
{
|
||||
using (DisposableDirectory directory = Temp.CreateDirectory())
|
||||
{
|
||||
string projectDirectory = directory.Path;
|
||||
|
||||
new NewCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute("-t msbuild")
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
new Build3Command()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
new Run3Command()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput()
|
||||
.Should()
|
||||
.Pass()
|
||||
.And
|
||||
.HaveStdOutContaining("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue