Ejemplo n.º 1
0
        public void Should_Add_Default_Arguments()
        {
            var fixture = new JekyllServeCommandFixture();

            var result = fixture.Run();

            result.Args.Should().Be("exec jekyll serve");
        }
Ejemplo n.º 2
0
        public void Should_Add_Layouts_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { Layouts = @"c:\layoutsDir" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll serve --layouts ""c:/layoutsDir""");
        }
Ejemplo n.º 3
0
        public void Should_Add_Multiple_Plugin_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { Plugins = new [] { @"c:\pluginDir1", @"c:\pluginDir2" } },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll serve --plugins ""c:/pluginDir1"" ""c:/pluginDir2""");
        }
Ejemplo n.º 4
0
        public void Should_Add_StrictFrontMatter_To_Arguments_If_Not_Null(bool?strictFrontMatter, string expected)
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { StrictFrontMatter = strictFrontMatter },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll serve{expected}");
        }
Ejemplo n.º 5
0
        public void Should_Add_BaseUrl_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { BaseUrl = @"http://*****:*****@"exec jekyll serve --baseurl ""http://localhost:8042""");
        }
Ejemplo n.º 6
0
        public void Should_Add_Watch_To_Arguments_If_Not_Null(bool?regeneration, string expected)
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { Watch = regeneration },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll serve{expected}");
        }
Ejemplo n.º 7
0
        public void Should_Add_LogLevel_To_Arguments_If_Not_Null(JekyllLogLevel?logLevel, string expected)
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { LogLevel = logLevel },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll serve{expected}");
        }
Ejemplo n.º 8
0
        public void Should_Add_Hostname_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { Hostname = "MACHINENAME" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll serve --host ""MACHINENAME""");
        }
Ejemplo n.º 9
0
        public void Should_Add_Source_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { Source = @"c:\sourceDir" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll serve --source ""c:/sourceDir""");
        }
Ejemplo n.º 10
0
        public void Should_Add_Destination_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { Destination = @"c:\destinationDir" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll serve --destination ""c:/destinationDir""");
        }
Ejemplo n.º 11
0
        public void Should_Add_LiveReloadPort_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { LiveReloadPort = 8043 },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll serve --livereload-port 8043");
        }
Ejemplo n.º 12
0
        public void Should_Add_Multiple_Configuration_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { Configuration = new [] { @"c:\_config1.yml", @"c:\_config2.yml" } },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll serve --config ""c:/_config1.yml"" ""c:/_config2.yml""");
        }
Ejemplo n.º 13
0
        public void Should_Add_Multiple_LiveReloadIgnore_Glob_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { LiveReloadIgnore = new [] { "*.cake", "*.cs" } },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll serve --livereload-ignore ""*.cake"" ""*.cs""");
        }
Ejemplo n.º 14
0
        public void Should_Add_LiveReloadMaxDelay_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { LiveReloadMaxDelay = TimeSpan.FromSeconds(42) },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll serve --livereload-max-delay 42");
        }
Ejemplo n.º 15
0
        public void Should_Add_SkipInitialBuild_To_Arguments_If_Not_Null(bool?skipInitialBuild, string expected)
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { SkipInitialBuild = skipInitialBuild },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll serve{expected}");
        }
Ejemplo n.º 16
0
        public void Should_Add_LiveReload_To_Arguments_If_Not_Null(bool?liveReload, string expected)
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { LiveReload = liveReload },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll serve{expected}");
        }
Ejemplo n.º 17
0
        public void Should_Add_ShowDirListing_To_Arguments_If_Not_Null(bool?showDirListing, string expected)
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { ShowDirListing = showDirListing },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll serve{expected}");
        }
Ejemplo n.º 18
0
        public void Should_Add_Detach_To_Arguments_If_Not_Null(bool?detach, string expected)
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { Detach = detach },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll serve{expected}");
        }
Ejemplo n.º 19
0
        public void Should_Add_OpenUrl_To_Arguments_If_Not_Null(bool?openUrl, string expected)
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { OpenUrl = openUrl },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll serve{expected}");
        }
Ejemplo n.º 20
0
        public void Should_Add_LimitPosts_To_Arguments_If_Not_Null(int?limitPosts, string expected)
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { LimitPosts = limitPosts },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll serve{expected}");
        }
Ejemplo n.º 21
0
        public void Should_Add_SslKey_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { SslKey = @"c:\localhost.key" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll serve --ssl-key ""c:/localhost.key""");
        }
Ejemplo n.º 22
0
        public void Should_Throw_If_Settings_Are_Null()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = null,
            };

            Action action = () => fixture.Run();

            action.Should().Throw <ArgumentNullException>()
            .Which.ParamName.Should().Be("settings");
        }
Ejemplo n.º 23
0
        public void Should_Add_Default_Arguments_When_Bundler_Is_Disabled()
        {
            var fixture = new JekyllServeCommandFixture
            {
                Settings = { DoNotUseBundler = true },
            };

            fixture.GivenJekyllToolExist();

            var result = fixture.Run();

            result.Args.Should().Be("serve");
        }