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); }
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); }
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); }
public static void MkDocsGhDeploy(this ICakeContext context, DirectoryPath projectDirectory, MkDocsGhDeploySettings settings) { var runner = MkDocsRunnerFactory.CreateGhDeployRunner(context); runner.GhDeploy(projectDirectory, settings); }