Esempio n. 1
0
        public void It_generates_the_right_arguments_for_DiscoverTests()
        {
            const int    port     = 1;
            const string assembly = "assembly.dll";

            var discoverTestsArgumentsBuilder = new DiscoverTestsArgumentsBuilder(assembly, port);

            var arguments = discoverTestsArgumentsBuilder.BuildArguments();

            arguments.Should().BeEquivalentTo(assembly, "--list", "--designtime", "--port", $"{port}");
        }
Esempio n. 2
0
        public void It_passes_the_right_arguments_to_the_run_tests_arguments_builder()
        {
            _testDiscoveryStartMessageHandler.HandleMessage(
                _dotnetTestMock.Object,
                _validMessage);

            _argumentsBuilder.Should().NotBeNull();

            var arguments = _argumentsBuilder.BuildArguments();

            arguments.Should().Contain("--port", $"{TestRunnerPort}");
            arguments.Should().Contain($"{AssemblyUnderTest}");
            arguments.Should().Contain("--list");
            arguments.Should().Contain("--designtime");
        }