Ejemplo n.º 1
0
            public void Should_Add_Force_To_Arguments_If_True()
            {
                // Given
                var fixture = new DocFxBuildRunnerFixture
                {
                    Settings = { Force = true }
                };

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("build --force", result.Args);
            }
Ejemplo n.º 2
0
            public void Should_Throw_If_Settings_Are_Null()
            {
                // Given
                var fixture = new DocFxBuildRunnerFixture
                {
                    Settings = null
                };

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                result.IsArgumentNullException("settings");
            }
Ejemplo n.º 3
0
            public void Should_Not_Add_LogLevel_To_Arguments_If_Default()
            {
                // Given
                var fixture = new DocFxBuildRunnerFixture
                {
                    Settings = { LogLevel = DocFxLogLevel.Default }
                };

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("build", result.Args);
            }
Ejemplo n.º 4
0
            public void Should_Add_LogLevel_To_Arguments_If_Set(DocFxLogLevel logLevel, string expectedLevel)
            {
                // Given
                var fixture = new DocFxBuildRunnerFixture
                {
                    Settings = { LogLevel = logLevel }
                };

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("build --logLevel \"" + expectedLevel + "\"", result.Args);
            }
Ejemplo n.º 5
0
            public void Should_Add_LogPath_To_Arguments_If_Set()
            {
                // Given
                var fixture = new DocFxBuildRunnerFixture
                {
                    Settings = { LogPath = @"c:\temp\docfx.log" }
                };

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("build -l \"c:/temp/docfx.log\"", result.Args);
            }
            public void Should_Add_WarningsAsErrors_To_Arguments_If_True()
            {
                // Given
                var fixture = new DocFxBuildRunnerFixture
                {
                    Settings = { WarningsAsErrors = true }
                };

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("build --warningsAsErrors", result.Args);
            }