Example #1
0
        public void Should_Add_Default_Arguments()
        {
            var fixture = new JekyllNewThemeCommandFixture();

            var result = fixture.Run();

            result.Args.Should().Be("exec jekyll new-theme");
        }
Example #2
0
        public void Should_Add_Source_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllNewThemeCommandFixture
            {
                Settings = { Source = @"c:\sourceDir" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll new-theme --source ""c:/sourceDir""");
        }
Example #3
0
        public void Should_Add_Blank_To_Arguments_If_Not_Null(bool?codeOfConduct, string expected)
        {
            var fixture = new JekyllNewThemeCommandFixture
            {
                Settings = { CodeOfConduct = codeOfConduct },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll new-theme{expected}");
        }
Example #4
0
        public void Should_Add_Name_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllNewThemeCommandFixture
            {
                Settings = { Name = @"mytheme" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll new-theme ""mytheme""");
        }
Example #5
0
        public void Should_Add_Trace_To_Arguments_If_Not_Null(bool?trace, string expected)
        {
            var fixture = new JekyllNewThemeCommandFixture
            {
                Settings = { Trace = trace },
            };

            var result = fixture.Run();

            result.Args.Should().Be($"exec jekyll new-theme{expected}");
        }
Example #6
0
        public void Should_Add_Layouts_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllNewThemeCommandFixture
            {
                Settings = { Layouts = @"c:\layoutsDir" },
            };

            var result = fixture.Run();

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

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll new-theme --plugins ""c:/pluginDir1"" ""c:/pluginDir2""");
        }
Example #8
0
        public void Should_Add_Destination_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllNewThemeCommandFixture
            {
                Settings = { Destination = @"c:\destinationDir" },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll new-theme --destination ""c:/destinationDir""");
        }
Example #9
0
        public void Should_Throw_If_Settings_Are_Null()
        {
            var fixture = new JekyllNewThemeCommandFixture
            {
                Settings = null,
            };

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

            action.Should().Throw <ArgumentNullException>()
            .Which.ParamName.Should().Be("settings");
        }
Example #10
0
        public void Should_Add_Default_Arguments_When_Bundler_Is_Disabled()
        {
            var fixture = new JekyllNewThemeCommandFixture
            {
                Settings = { DoNotUseBundler = true },
            };

            fixture.GivenJekyllToolExist();

            var result = fixture.Run();

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