Remove deprecated test assets (#4546)
* Remove deprecated test assets * Add missing nuget configs and fix poorly named test folder * Test Cleanup
This commit is contained in:
parent
5a621b53e2
commit
d804502a8a
204 changed files with 20 additions and 3493 deletions
|
@ -15,32 +15,26 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
|||
public void It_builds_a_runnable_output()
|
||||
{
|
||||
var testAppName = "MSBuildTestApp";
|
||||
var testInstance = TestAssetsManager
|
||||
.CreateTestInstance(testAppName);
|
||||
|
||||
var testProjectDirectory = testInstance.TestRoot;
|
||||
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.Execute("/p:SkipInvalidConfigurations=true")
|
||||
.Should()
|
||||
.Pass();
|
||||
var testInstance = TestAssets.Get(testAppName)
|
||||
.CreateInstance(testAppName)
|
||||
.WithSourceFiles()
|
||||
.WithRestoreFiles();
|
||||
|
||||
new BuildCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.WithWorkingDirectory(testInstance.Root)
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
.Should().Pass();
|
||||
|
||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp1.0", $"{testAppName}.dll");
|
||||
|
||||
var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp1.0")
|
||||
.GetFile($"{testAppName}.dll");
|
||||
|
||||
var outputRunCommand = new TestCommand("dotnet");
|
||||
|
||||
outputRunCommand.ExecuteWithCapturedOutput(outputDll)
|
||||
.Should()
|
||||
.Pass()
|
||||
.And
|
||||
.HaveStdOutContaining("Hello World");
|
||||
outputRunCommand.ExecuteWithCapturedOutput(outputDll.FullName)
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello World");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace Microsoft.DotNet.Tests
|
|||
public void TestProjectToolIsAvailableThroughDriver(string appName)
|
||||
{
|
||||
var testInstance = TestAssets.Get(appName)
|
||||
.CreateInstance(appName, identifier: appName)
|
||||
.CreateInstance()
|
||||
.WithSourceFiles()
|
||||
.WithRestoreFiles();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue