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

            var result = fixture.Run();

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

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll doctor --source ""c:/sourceDir""");
        }
        public void Should_Add_Multiple_Configuration_To_Arguments_If_Not_Null()
        {
            var fixture = new JekyllDoctorCommandFixture
            {
                Settings = { Configuration = new [] { @"c:\_config1.yml", @"c:\_config2.yml" } },
            };

            var result = fixture.Run();

            result.Args.Should().Be(@"exec jekyll doctor --config ""c:/_config1.yml"" ""c:/_config2.yml""");
        }
        public void Should_Add_Trace_To_Arguments_If_Not_Null(bool?trace, string expected)
        {
            var fixture = new JekyllDoctorCommandFixture
            {
                Settings = { Trace = trace },
            };

            var result = fixture.Run();

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

            var result = fixture.Run();

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

            var result = fixture.Run();

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

            var result = fixture.Run();

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

            fixture.GivenJekyllToolExist();

            var result = fixture.Run();

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