public void Should_Add_Default_Arguments()
        {
            var fixture = new JekyllNewCommandFixture();

            var result = fixture.Run();

            result.Args.Should().Be("exec jekyll new");
        }
        public void Should_Add_Blank_To_Arguments_If_Not_Null(bool?blank, string expected)
        {
            var fixture = new JekyllNewCommandFixture
            {
                Settings = { Blank = blank },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll new{expected}");
        }
        public void Should_Add_Path_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllNewCommandFixture
            {
                Settings = { Path = @"c:\newSiteDir" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll new ""c:/newSiteDir""");
        }
        public void Should_Add_LiquidProfile_To_Arguments_If_Not_Null(bool?liquidProfile, string expected)
        {
            var fixture = new JekyllNewCommandFixture
            {
                Settings = { LiquidProfile = liquidProfile },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll new{expected}");
        }
        public void Should_Add_Layouts_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllNewCommandFixture
            {
                Settings = { Layouts = @"c:\layoutsDir" },
            };

            var result = fixture.Run();

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

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll new --plugins ""c:/pluginDir1"" ""c:/pluginDir2""");
        }
        public void Should_Add_Safe_To_Arguments_If_Not_Null(bool?safeMode, string expected)
        {
            var fixture = new JekyllNewCommandFixture
            {
                Settings = { SafeMode = safeMode },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll new{expected}");
        }
        public void Should_Add_Destination_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllNewCommandFixture
            {
                Settings = { Destination = @"c:\destinationDir" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll new --destination ""c:/destinationDir""");
        }
        public void Should_Add_Source_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllNewCommandFixture
            {
                Settings = { Source = @"c:\sourceDir" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll new --source ""c:/sourceDir""");
        }
        public void Should_Throw_If_Settings_Are_Null()
        {
            var fixture = new JekyllNewCommandFixture
            {
                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 JekyllNewCommandFixture
            {
                Settings = { DoNotUseBundler = true },
            };

            fixture.GivenJekyllToolExist();

            var result = fixture.Run();

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