public void WhenOnlyPathIsSet_CommandLineIsCorrect() { var fixture = new DockerBuildFixture { Settings = new DockerImageBuildSettings(), Path = "path" }; var actual = fixture.Run(); Assert.That(actual.Args, Is.EqualTo("build path")); }
public void WhenPathIsQuoted_ArgumentIsNotDoubleQuoted(string path) { var fixture = new DockerBuildFixture { Settings = new DockerImageBuildSettings(), Path = path }; var actual = fixture.Run(); Assert.That(actual.Args, Is.EqualTo($"build {path}")); }
public void WhenPathHasSingleQuote_ArgumentIsQuoted() { var fixture = new DockerBuildFixture { Settings = new DockerImageBuildSettings(), Path = "\"" }; var actual = fixture.Run(); Assert.That(actual.Args, Is.EqualTo(@"build """"""")); }
public void WhenPullFlagIsSetToTrue_CommandLineDoesHavePull() { var fixture = new DockerBuildFixture { Settings = new DockerImageBuildSettings { Pull = true }, Path = "path" }; var actual = fixture.Run(); Assert.That(actual.Args, Is.EqualTo("build --pull path")); }
public void WhenForceRmFlagIsSetToFalse_CommandLineDoesNotHaveForceRm() { var fixture = new DockerBuildFixture { Settings = new DockerImageBuildSettings { ForceRm = false }, Path = "path" }; var actual = fixture.Run(); Assert.That(actual.Args, Is.EqualTo("build path")); }
public void WhenRmFlagIsSet_CommandLineIsCorrect() { var fixture = new DockerBuildFixture { Settings = new DockerImageBuildSettings { Rm = true }, Path = "path" }; var actual = fixture.Run(); Assert.That(actual.Args, Is.EqualTo("build --rm path")); }