Fixing GivenThatWeWantToUseDotnetTestE2EInDesignTimeForMultipleTFms to give separate paths to the TestAssetsManager.CreateTestInstance by passing in a callingMethod name.
This commit is contained in:
parent
4aa22c3344
commit
adbf30c192
1 changed files with 14 additions and 5 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Microsoft.DotNet.InternalAbstractions;
|
using Microsoft.DotNet.InternalAbstractions;
|
||||||
using Microsoft.DotNet.ProjectModel;
|
using Microsoft.DotNet.ProjectModel;
|
||||||
|
@ -14,13 +15,13 @@ namespace Microsoft.Dotnet.Tools.Test.Tests
|
||||||
{
|
{
|
||||||
public class GivenThatWeWantToUseDotnetTestE2EInDesignTimeForMultipleTFms : TestBase
|
public class GivenThatWeWantToUseDotnetTestE2EInDesignTimeForMultipleTFms : TestBase
|
||||||
{
|
{
|
||||||
private readonly string _projectFilePath;
|
private string _projectFilePath;
|
||||||
private readonly string _netCoreAppOutputPath;
|
private string _netCoreAppOutputPath;
|
||||||
private readonly string _net451OutputPath;
|
private string _net451OutputPath;
|
||||||
|
|
||||||
public GivenThatWeWantToUseDotnetTestE2EInDesignTimeForMultipleTFms()
|
private void Setup([CallerMemberName] string callingMethod = "")
|
||||||
{
|
{
|
||||||
var testInstance = TestAssetsManager.CreateTestInstance(Path.Combine("ProjectsWithTests", "MultipleFrameworkProject"));
|
var testInstance = TestAssetsManager.CreateTestInstance(Path.Combine("ProjectsWithTests", "MultipleFrameworkProject"), callingMethod);
|
||||||
|
|
||||||
_projectFilePath = Path.Combine(testInstance.TestRoot, "project.json");
|
_projectFilePath = Path.Combine(testInstance.TestRoot, "project.json");
|
||||||
var contexts = ProjectContext.CreateContextForEachFramework(
|
var contexts = ProjectContext.CreateContextForEachFramework(
|
||||||
|
@ -51,6 +52,8 @@ namespace Microsoft.Dotnet.Tools.Test.Tests
|
||||||
[WindowsOnlyFact]
|
[WindowsOnlyFact]
|
||||||
public void It_discovers_tests_for_the_ProjectWithTestsWithNetCoreApp()
|
public void It_discovers_tests_for_the_ProjectWithTestsWithNetCoreApp()
|
||||||
{
|
{
|
||||||
|
Setup();
|
||||||
|
|
||||||
using (var adapter = new Adapter("TestDiscovery.Start"))
|
using (var adapter = new Adapter("TestDiscovery.Start"))
|
||||||
{
|
{
|
||||||
adapter.Listen();
|
adapter.Listen();
|
||||||
|
@ -68,6 +71,8 @@ namespace Microsoft.Dotnet.Tools.Test.Tests
|
||||||
[WindowsOnlyFact]
|
[WindowsOnlyFact]
|
||||||
public void It_discovers_tests_for_the_ProjectWithTestsWithNet451()
|
public void It_discovers_tests_for_the_ProjectWithTestsWithNet451()
|
||||||
{
|
{
|
||||||
|
Setup();
|
||||||
|
|
||||||
using (var adapter = new Adapter("TestDiscovery.Start"))
|
using (var adapter = new Adapter("TestDiscovery.Start"))
|
||||||
{
|
{
|
||||||
adapter.Listen();
|
adapter.Listen();
|
||||||
|
@ -86,6 +91,8 @@ namespace Microsoft.Dotnet.Tools.Test.Tests
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_runs_tests_for_netcoreapp10()
|
public void It_runs_tests_for_netcoreapp10()
|
||||||
{
|
{
|
||||||
|
Setup();
|
||||||
|
|
||||||
using (var adapter = new Adapter("TestExecution.GetTestRunnerProcessStartInfo"))
|
using (var adapter = new Adapter("TestExecution.GetTestRunnerProcessStartInfo"))
|
||||||
{
|
{
|
||||||
adapter.Listen();
|
adapter.Listen();
|
||||||
|
@ -105,6 +112,8 @@ namespace Microsoft.Dotnet.Tools.Test.Tests
|
||||||
[WindowsOnlyFact]
|
[WindowsOnlyFact]
|
||||||
public void It_runs_tests_for_net451()
|
public void It_runs_tests_for_net451()
|
||||||
{
|
{
|
||||||
|
Setup();
|
||||||
|
|
||||||
using (var adapter = new Adapter("TestExecution.GetTestRunnerProcessStartInfo"))
|
using (var adapter = new Adapter("TestExecution.GetTestRunnerProcessStartInfo"))
|
||||||
{
|
{
|
||||||
adapter.Listen();
|
adapter.Listen();
|
||||||
|
|
Loading…
Reference in a new issue