public void WhenPreCommand_ItAppearsInPreCommands() { TestSettings input = new TestSettings { PreCommandValue = "preCommand" }; var actual = ArgumentsBuilderExtension.GetArgumentFromProperty(PreCommandValueProperty, input, preCommand: true, isSecret: false); Assert.That(actual.Count(), Is.EqualTo(1)); }
public void WhenGivenValue_PropertyIsHandled() { TestSettings settings = new TestSettings { Enum = TestEnum.One }; var actual = ArgumentsBuilderExtension.GetArgumentFromProperty(EnumProperty, settings); Assert.That(actual.ToArray().Length, Is.EqualTo(1)); }
public void WhenPreCommand_DoesNotAppearInNormalCommands() { TestSettings input = new TestSettings { PreCommandValue = "preCommand" }; var actual = ArgumentsBuilderExtension.GetArgumentFromProperty(PreCommandValueProperty, input, preCommand: false, isSecret: false); Assert.That(actual.Count(), Is.Zero); }