public void Should_Add_Default_Arguments() { var fixture = new JekyllServeCommandFixture(); var result = fixture.Run(); result.Args.Should().Be("exec jekyll serve"); }
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"""); }
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"""); }
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}"); }
public void Should_Add_BaseUrl_To_Arguments_If_Not_Null() { var fixture = new JekyllServeCommandFixture { Settings = { BaseUrl = @"http://*****:*****@"exec jekyll serve --baseurl ""http://localhost:8042"""); }
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}"); }
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}"); }
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"""); }
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"""); }
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"""); }
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"); }
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"""); }
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"""); }
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"); }
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}"); }
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}"); }
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}"); }
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}"); }
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}"); }
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}"); }
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"""); }
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"); }
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"); }