public void AddFalseValidationPredicate() { // Arrange. ValidatableArgument <bool> argument = new ValidatableArgument <bool>("argument", true); // Act. argument.IsFalse(); // Assert. Assert.AreEqual(1, argument.ValidationPredicates.Count()); Assert.IsInstanceOfType(argument.ValidationPredicates.First(), typeof(FalseValidationPredicate)); }
public void AddFalseValidationPredicate() { // Arrange. ValidatableArgument<bool> argument = new ValidatableArgument<bool>("argument", true); // Act. argument.IsFalse(); // Assert. Assert.AreEqual(1, argument.ValidationPredicates.Count()); Assert.IsInstanceOfType(argument.ValidationPredicates.First(), typeof(FalseValidationPredicate)); }
public void RunInExpectedTime() { // Arrange. ValidatableArgument <bool> argument = new ValidatableArgument <bool>("argument", true); // Act & Assert. Ensure.ActionRunsInExpectedTime( () => { argument.IsFalse(); }, PerformanceConstants.ValidationPredicateExecutionCount, PerformanceConstants.ValidationPredicateTotalExecutionExpectedTime); }
public void RunInExpectedTime() { // Arrange. ValidatableArgument<bool> argument = new ValidatableArgument<bool>("argument", true); // Act & Assert. Ensure.ActionRunsInExpectedTime( () => { argument.IsFalse(); }, PerformanceConstants.ValidationPredicateExecutionCount, PerformanceConstants.ValidationPredicateTotalExecutionExpectedTime); }