예제 #1
0
            public void Should_Throw_For_Null_Context_For_Working_Directory()
            {
                // Given
                var settings = new MkDocsGhDeploySettings();

                // When
                var result = Record.Exception(() => MkDocsAliases.MkDocsGhDeploy(null, settings));

                // Then
                Assert.IsType <ArgumentNullException>(result);
                Assert.Equal("context", ((ArgumentNullException)result).ParamName);
            }
예제 #2
0
            public void Should_Not_Throw_For_Defined_Settings_For_Working_Directory()
            {
                // Given
                var context  = new MkDocsContextFixture();
                var settings = new MkDocsGhDeploySettings();

                // When
                var result = Record.Exception(() => context.MkDocsGhDeploy(settings));

                // Then
                Assert.Null(result);
            }
예제 #3
0
            public void Should_Not_Throw_For_Defined_Settings()
            {
                // Given
                var context    = new MkDocsContextFixture();
                var settings   = new MkDocsGhDeploySettings();
                var projectDir = new DirectoryPath("./project");

                // When
                var result = Record.Exception(() => context.MkDocsGhDeploy(projectDir, settings));

                // Then
                Assert.Null(result);
            }
예제 #4
0
        public static void MkDocsGhDeploy(this ICakeContext context, DirectoryPath projectDirectory, MkDocsGhDeploySettings settings)
        {
            var runner = MkDocsRunnerFactory.CreateGhDeployRunner(context);

            runner.GhDeploy(projectDirectory, settings);
        }