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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
        public void It_discovers_tests_for_the_ProjectWithTestsWithNet46()
        {
            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 net46 -r {rid} -o {_net46OutputPath} --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_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);
            }
        }
Ejemplo n.º 7
0
        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);
            }
        }
Ejemplo n.º 8
0
        public void It_runs_tests_for_net451()
        {
            Setup();

            using (var adapter = new Adapter("TestExecution.GetTestRunnerProcessStartInfo"))
            {
                adapter.Listen();

                var testCommand = new DotnetTestCommand();
                var rid         = RuntimeEnvironmentRidExtensions.GetAllCandidateRuntimeIdentifiers().First();
                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["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);
            }
        }
        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);
            }
        }