Refactor output directory code

This commit is contained in:
Pavel Krymets 2016-02-03 10:57:25 -08:00
parent 4908436958
commit 0f82ae37f3
49 changed files with 836 additions and 396 deletions

View file

@ -32,17 +32,17 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests
// run compile
var outputDir = Path.Combine(testLibDir.Path, "bin");
var testProject = GetProjectPath(testLibDir);
var buildCommand = new BuildCommand(testProject, output: outputDir);
var buildCommand = new BuildCommand(testProject, output: outputDir, framework: DefaultFramework);
var result = buildCommand.ExecuteWithCapturedOutput();
result.Should().Pass();
// verify the output xml file
var outputXml = Path.Combine(outputDir, "Debug", "dnxcore50", "TestLibrary.xml");
var outputXml = Path.Combine(outputDir, "Debug", DefaultFramework, "TestLibrary.xml");
Console.WriteLine("OUTPUT XML PATH: " + outputXml);
Assert.True(File.Exists(outputXml));
Assert.Contains("Gets the message from the helper", File.ReadAllText(outputXml));
}
[Fact]
public void LibraryWithAnalyzer()
{
@ -55,7 +55,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests
// run compile
var outputDir = Path.Combine(testLibDir.Path, "bin");
var testProject = GetProjectPath(testLibDir);
var buildCmd = new BuildCommand(testProject, output: outputDir);
var buildCmd = new BuildCommand(testProject, output: outputDir, framework: DefaultFramework);
var result = buildCmd.ExecuteWithCapturedOutput();
result.Should().Pass();
Assert.Contains("CA1018", result.StdOut);