예제 #1
0
            public void Debug_Option_Ignore_Case_Debug_Is_True()
            {
                var arguments = new[] { "test.html", "/tRAce" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.True(commandLine.Trace);
            }
예제 #2
0
            public void CoverageExclude_Option_With_Value_CoverageIgnorePattern_Set()
            {
                var arguments = new[] { "test.html", "/coverageIgnores", "*.ts" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.Equal("*.ts", commandLine.CoverageIgnorePatterns);
            }
예제 #3
0
            public void File_Option_Adds_File()
            {
                var arguments = new[] { "/file", "test.html" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.Contains("test.html", commandLine.Files);
            }
예제 #4
0
            public void Coverage_Option_Not_Passed_Coverage_False()
            {
                var arguments = new[] { "test.html" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.False(commandLine.Coverage);
            }
예제 #5
0
            public void Path_Option_Ignores_Case()
            {
                string[] arguments = new[] { "/paTH", "test" };

                TestableCommandLine commandLine = TestableCommandLine.Create(arguments);

                Assert.Contains("test", commandLine.Files);
            }
예제 #6
0
            public void TeamCity_Option_Ignore_Case_TeamCity_True()
            {
                var arguments = new[] { "test.html", "/tEaMcItY" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.True(commandLine.TeamCity);
            }
예제 #7
0
            public void VSOutput_Option_Debug_Is_VSOutput()
            {
                var arguments = new[] { "test.html", "/vsoutput" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.True(commandLine.VsOutput);
            }
예제 #8
0
            public void Will_set_to_number_passed_in()
            {
                var arguments = new[] { "test.html", "/timeoutmilliseconds", "10" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.Equal(10, commandLine.TimeOutMilliseconds);
            }
예제 #9
0
            public void Will_ignore_case()
            {
                var arguments = new[] { "test.html", "/timeoutMilliseconds", "10" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.Equal(10, commandLine.TimeOutMilliseconds);
            }
예제 #10
0
            public void Wait_Option_Ignore_Case_Wait_Is_True()
            {
                var arguments = new[] { "test.html", "/wAiT" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.True(commandLine.Wait);
            }
예제 #11
0
            public void Will_be_null_if_not_pass()
            {
                var arguments = new[] { "test.html" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.Null(commandLine.TimeOutMilliseconds);
            }
예제 #12
0
            public void Silent_Option_Silent_Is_True()
            {
                var arguments = new[] { "test.html", "/NoLogo" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.True(commandLine.NoLogo);
            }
예제 #13
0
            public void Silent_Option_Not_Passed_Silent_False()
            {
                var arguments = new[] { "test.html" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.False(commandLine.NoLogo);
            }
예제 #14
0
            public void Silent_Option_Ignore_Case_Silent_Is_True()
            {
                var arguments = new[] { "test.html", "/sIlEnT" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.True(commandLine.Silent);
            }
예제 #15
0
            public void TeamCity_Option_Not_Passed_Environment_Set_TeamCity_True()
            {
                var arguments = new[] { "test.html" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.True(commandLine.TeamCity);
            }
예제 #16
0
            public void Will_throw_if_arg_is_negative()
            {
                var arguments = new[] { "test.html", "/timeoutmilliseconds", "-10" };

                var ex = Record.Exception(() => TestableCommandLine.Create(arguments)) as ArgumentException;

                Assert.NotNull(ex);
            }
예제 #17
0
            public void TeamCity_Option_TeamCity_True()
            {
                var arguments = new[] { "test.html", "/teamcity" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.True(commandLine.TeamCity);
            }
예제 #18
0
            public void First_Argument_With_No_Slash_Is_Added_As_File()
            {
                var arguments = new[] { "test.html" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.Contains("test.html", commandLine.Files);
            }
예제 #19
0
            public void VSOutput_Option_Not_Passed_VSOutput_False()
            {
                var arguments = new[] { "test.html" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.False(commandLine.VsOutput);
            }
예제 #20
0
            public void Will_set_to_number_passed_in()
            {
                var arguments = new[] { "test.html", "/parallelism", "3" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.Equal(3, commandLine.Parallelism);
            }
예제 #21
0
            public void VSOutput_Option_Ignore_Case_VSOutput_Is_True()
            {
                var arguments = new[] { "test.html", "/VsOutpUt" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.True(commandLine.VsOutput);
            }
예제 #22
0
            public void Will_ignore_case()
            {
                var arguments = new[] { "test.html", "/ParaLLelisM", "3" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.Equal(3, commandLine.Parallelism);
            }
예제 #23
0
            public void Coverage_Option_Coverage_Is_True()
            {
                var arguments = new[] { "test.html", "/coverage" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.True(commandLine.Coverage);
            }
예제 #24
0
            public void Will_set_to_cpu_count_plus_one_if_no_option_given()
            {
                var arguments = new[] { "test.html", "/parallelism" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.Equal(Environment.ProcessorCount + 1, commandLine.Parallelism);
            }
예제 #25
0
            public void CoverageExclude_Option_Not_Passed_CoverageIgnorePattern_Null()
            {
                var arguments = new[] { "test.html" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.Null(commandLine.CoverageIgnorePatterns);
            }
예제 #26
0
            public void Will_throw_if_arg_is_not_a_number()
            {
                var arguments = new[] { "test.html", "/parallelism", "sdf" };

                var ex = Record.Exception(() => TestableCommandLine.Create(arguments)) as ArgumentException;

                Assert.NotNull(ex);
            }
예제 #27
0
            public void Will_throw_if_no_arg_given_to_CoverageExclude()
            {
                var arguments = new[] { "test.html", "/coverageExcludes" };

                var ex = Record.Exception(() => TestableCommandLine.Create(arguments)) as ArgumentException;

                Assert.NotNull(ex);
            }
예제 #28
0
            public void TeamCity_Option_Not_Passed_TeamCity_False()
            {
                var arguments = new[] { "test.html" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.False(commandLine.TeamCity);
            }
예제 #29
0
            public void File_Option_Ignores_Case()
            {
                string[] arguments = new[] { "/fIlE", "test.html" };

                TestableCommandLine commandLine = TestableCommandLine.Create(arguments);

                Assert.Contains("test.html", commandLine.Files);
            }
예제 #30
0
            public void Debug_Option_Not_Passed_Debug_False()
            {
                var arguments = new[] { "test.html" };

                var commandLine = TestableCommandLine.Create(arguments);

                Assert.False(commandLine.Trace);
            }