public void WhenGivenStringPropertyAndGivenParameter_FormatsProperly() { var actual = ArgumentsBuilderExtension.GetArgumentFromStringProperty(StringProperty, "tubo", parameter: new ParameterAttribute("-custom_name")); Assert.That(actual, Is.EqualTo("-custom_name=\"tubo\"")); }
public void WhenGivenStringProperty_FormatsProperly() { var actual = ArgumentsBuilderExtension.GetArgumentFromStringProperty(StringProperty, "tubo", isSecret: true).Value; Assert.That(actual.Key, Is.EqualTo("--string")); Assert.That(actual.Value, Is.EqualTo("tubo")); Assert.That(actual.Quoting, Is.EqualTo(DockerArgumentQuoting.QuotedSecret)); }
public void WhenGivenNull_NullIsReturned() { var actual = ArgumentsBuilderExtension.GetArgumentFromStringProperty(StringProperty, null); Assert.That(actual, Is.Null); }
public void WhenGivenStringProperty_FormatsProperly() { var actual = ArgumentsBuilderExtension.GetArgumentFromStringProperty(StringProperty, "tubo"); Assert.That(actual, Is.EqualTo("--string \"tubo\"")); }
public void WhenGivenStringPropertyAndNoParameter_FormatsProperly() { var actual = ArgumentsBuilderExtension.GetArgumentFromStringProperty(StringProperty, "tubo", parameter: null); Assert.That(actual, Is.EqualTo("/string=\"tubo\"")); }