Fix run tests
This commit is contained in:
parent
7407a898e0
commit
89cf169a08
4 changed files with 15 additions and 11 deletions
|
@ -6,7 +6,7 @@ namespace ConsoleApplication
|
|||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
.WriteLine("NET451");
|
||||
Console.WriteLine("NET451");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
},
|
||||
|
||||
"frameworks": {
|
||||
"dummy1": { },
|
||||
"net451": { }
|
||||
"net451": { },
|
||||
"net45": { }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
"dotnet-build.Tests",
|
||||
"dotnet-pack.Tests",
|
||||
"dotnet-resgen.Tests",
|
||||
"dotnet-run.Tests",
|
||||
"Microsoft.DotNet.Cli.Utils.Tests",
|
||||
"Microsoft.DotNet.Compiler.Common.Tests",
|
||||
"Microsoft.DotNet.ProjectModel.Tests",
|
||||
|
|
|
@ -3,38 +3,41 @@
|
|||
|
||||
using System;
|
||||
using System.IO;
|
||||
using Microsoft.DotNet.TestFramework;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Compiler.Tests
|
||||
namespace Microsoft.DotNet.Tools.Run.Tests
|
||||
{
|
||||
public class CompilerTests : TestBase
|
||||
public class RunTests : TestBase
|
||||
{
|
||||
private static const string RunTestsBase = "RunTestsApps";
|
||||
private const string RunTestsBase = "RunTestsApps";
|
||||
|
||||
[WindowsOnlyFact]
|
||||
public void RunsSingleTarget()
|
||||
{
|
||||
TestInstance instance = TestAssetsManager.CreateTestInstance(Path.Combine(RunTestsBase, "TestAppDesktopClr"))
|
||||
TestInstance instance = TestAssetsManager.CreateTestInstance(Path.Combine(RunTestsBase, "TestAppFullClr"))
|
||||
.WithLockFiles()
|
||||
.WithBuildArtifacts();
|
||||
new RunCommand(testInstance.TestRoot).Execute().Should().Pass();
|
||||
new RunCommand(instance.TestRoot).Execute().Should().Pass();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RunsDefaultWhenPresent()
|
||||
{
|
||||
TestInstance instance = TestAssetsManager.CreateTestInstance(Path.Combine(RunTestsBase, "TestAppMultiTarget"))
|
||||
.WithLockFiles()
|
||||
.WithBuildArtifacts();
|
||||
new RunCommand(testInstance.TestRoot).Execute().Should().Pass();
|
||||
new RunCommand(instance.TestRoot).Execute().Should().Pass();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void FailsWithMultipleTargetAndNoDefault()
|
||||
{
|
||||
TestInstance instance = TestAssetsManager.CreateTestInstance(RunTestsBase, "TestAppMultiTargetNoCoreClr")
|
||||
TestInstance instance = TestAssetsManager.CreateTestInstance(Path.Combine(RunTestsBase, "TestAppMultiTargetNoCoreClr"))
|
||||
.WithLockFiles()
|
||||
.WithBuildArtifacts();
|
||||
new RunCommand(testInstance.TestRoot).Execute().Should().Fail();
|
||||
new RunCommand(instance.TestRoot).Execute().Should().Fail();
|
||||
}
|
||||
|
||||
private void CopyProjectToTempDir(string projectDir, TempDirectory tempDir)
|
||||
|
|
Loading…
Reference in a new issue