public void WhenDecoratedStrings_FormatsProperly() { var attribute = ArgumentsBuilderExtension.GetAutoPropertyAttributeOrNull(DecoratedStringsProperty); var actual = ArgumentsBuilderExtension.GetArgumentFromAutoProperty(attribute, DecoratedStringsProperty, new string[] { "One=1", "Two=2" }); Assert.That(actual, Is.EqualTo("-e One=1 -e Two=2")); }
public void WhenOnlyWhenTrueValue_AndIsTrue_FormatsProperly() { var attribute = ArgumentsBuilderExtension.GetAutoPropertyAttributeOrNull(DecoratedBoolProperty); var actual = ArgumentsBuilderExtension.GetArgumentFromAutoProperty(attribute, DecoratedBoolProperty, true); Assert.That(actual, Is.EqualTo("-v")); }
public void WhenOnlyWhenTrueValue_AndIsFalse_ReturnsEmptyString() { var attribute = ArgumentsBuilderExtension.GetAutoPropertyAttributeOrNull(DecoratedBoolProperty); var actual = ArgumentsBuilderExtension.GetArgumentFromAutoProperty(attribute, DecoratedBoolProperty, false); Assert.That(actual, Is.Empty); }
public void WhenGivenValue_FormatsProperly() { var attribute = ArgumentsBuilderExtension.GetAutoPropertyAttributeOrNull(DecoratedStringProperty); var actual = ArgumentsBuilderExtension.GetArgumentFromAutoProperty(attribute, DecoratedStringProperty, "SIGNAL"); Assert.That(actual, Is.EqualTo("-s SIGNAL")); }
public void WhenNotDecorated_ReturnsNull() { var actual = ArgumentsBuilderExtension.GetAutoPropertyAttributeOrNull(StringProperty); Assert.That(actual, Is.Null); }
public void WhenDecorated_ReturnsAutoPropertyAttribute() { var actual = ArgumentsBuilderExtension.GetAutoPropertyAttributeOrNull(DecoratedStringProperty); Assert.That(actual.Format, Is.EqualTo("-s {1}")); }