public void It_discovers_two_tests_for_the_ProjectWithTests() { using (var adapter = new Adapter("TestDiscovery.Start")) { adapter.Listen(); var testCommand = new DotnetTestCommand(); var result = testCommand.Execute($"{_projectFilePath} -o {_outputPath} --port {adapter.Port} --no-build"); result.Should().Pass(); adapter.Messages["TestSession.Connected"].Count.Should().Be(1); adapter.Messages["TestDiscovery.TestFound"].Count.Should().Be(2); adapter.Messages["TestDiscovery.Completed"].Count.Should().Be(1); } }
public void It_runs_two_tests_for_the_ProjectWithTests() { using (var adapter = new Adapter("TestExecution.GetTestRunnerProcessStartInfo")) { adapter.Listen(); var testCommand = new DotnetTestCommand(); var result = testCommand.Execute($"{_projectFilePath} -o {_outputPath} --port {adapter.Port} --no-build"); result.Should().Pass(); adapter.Messages["TestSession.Connected"].Count.Should().Be(1); adapter.Messages["TestExecution.TestRunnerProcessStartInfo"].Count.Should().Be(1); adapter.Messages["TestExecution.TestStarted"].Count.Should().Be(2); adapter.Messages["TestExecution.TestResult"].Count.Should().Be(2); adapter.Messages["TestExecution.Completed"].Count.Should().Be(1); } }
public void It_discovers_tests_for_the_ProjectWithTestsWithNet451() { Setup(); using (var adapter = new Adapter("TestDiscovery.Start")) { adapter.Listen(); var rid = RuntimeEnvironmentRidExtensions.GetAllCandidateRuntimeIdentifiers().First(); var testCommand = new DotnetTestCommand(); var result = testCommand.Execute($"{_projectFilePath} -f net451 -r {rid} -o {_net451OutputPath} --port {adapter.Port} --no-build"); result.Should().Pass(); adapter.Messages["TestSession.Connected"].Count.Should().Be(1); adapter.Messages["TestDiscovery.TestFound"].Count.Should().Be(4); adapter.Messages["TestDiscovery.Completed"].Count.Should().Be(1); } }
public void It_runs_tests_for_netcoreapp10() { Setup(); using (var adapter = new Adapter("TestExecution.GetTestRunnerProcessStartInfo")) { adapter.Listen(); var testCommand = new DotnetTestCommand(); var result = testCommand.Execute($"{_projectFilePath} -f netcoreapp1.0 -o {_netCoreAppOutputPath} --port {adapter.Port} --no-build"); result.Should().Pass(); adapter.Messages["TestSession.Connected"].Count.Should().Be(1); adapter.Messages["TestExecution.TestRunnerProcessStartInfo"].Count.Should().Be(1); adapter.Messages["TestExecution.TestStarted"].Count.Should().Be(4); adapter.Messages["TestExecution.TestResult"].Count.Should().Be(4); adapter.Messages["TestExecution.Completed"].Count.Should().Be(1); } }