示例#1
0
        public void Should_Add_Default_Arguments()
        {
            var fixture = new JekyllServeCommandFixture();

            var result = fixture.Run();

            result.Args.Should().Be("exec jekyll serve");
        }
示例#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""");
        }
示例#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""");
        }
示例#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}");
        }
示例#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""");
        }
示例#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}");
        }
示例#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}");
        }
示例#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""");
        }
示例#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""");
        }
示例#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""");
        }
示例#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");
        }
示例#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""");
        }
示例#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""");
        }
示例#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");
        }
示例#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}");
        }
示例#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}");
        }
示例#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}");
        }
示例#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}");
        }
示例#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}");
        }
示例#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}");
        }
示例#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""");
        }
示例#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");
        }
示例#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");
        }