Skip to content

Commit

Permalink
Changed paths for four testcases to use forward slashes and added cod…
Browse files Browse the repository at this point in the history
…e to address difference between Linux and Windows which use forward slashes and backwards slashes respectively.
  • Loading branch information
Manfred Lange committed Aug 6, 2017
1 parent a72914a commit 16d9eee
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/tests/VisualStudioProjectLoaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,20 @@ public void CanLoadVsProject(string resourceName, string[] configs, string assem
}
}

[TestCase("netcoreapp1.1-minimal.csproj", "Debug", @"bin\Debug\netcoreapp1.1")]
[TestCase("netcoreapp1.1-minimal.csproj", "Release", @"bin\Release\netcoreapp1.1")]
[TestCase("netcoreapp1.1-with-output-path.csproj", "Debug", @"bin\Debug\netcoreapp1.1")]
[TestCase("netcoreapp1.1-with-output-path.csproj", "Release", @"bin\Release\special")]
[TestCase("netcoreapp1.1-minimal.csproj", "Debug", @"bin/Debug/netcoreapp1.1")]
[TestCase("netcoreapp1.1-minimal.csproj", "Release", @"bin/Release/netcoreapp1.1")]
[TestCase("netcoreapp1.1-with-output-path.csproj", "Debug", @"bin/Debug/netcoreapp1.1")]
[TestCase("netcoreapp1.1-with-output-path.csproj", "Release", @"bin/Release/special")]
public void PicksUpCorrectOutputPath(string resourceName, string configuration, string expectedOutputPath)
{
using (TestResource file = new TestResource(resourceName))
{
IProject project = _loader.LoadFrom(file.Path);

var package = project.GetTestPackage(configuration);
Assert.That(package.Settings["BasePath"].ToString().EndsWith(expectedOutputPath));
// adjust for difference between Linux/Win:
var basePath = package.Settings["BasePath"].ToString().Replace('\\', '/');
Assert.That(basePath.EndsWith(expectedOutputPath));
}
}

Expand Down

0 comments on commit 16d9eee

Please sign in to comment.