public void AddStringNotEmptyValidationPredicate() { // Arrange. ValidatableArgument <string> argument = new ValidatableArgument <string>("argument", "string"); // Act. argument.IsNotEmpty(); // Assert. Assert.AreEqual(1, argument.ValidationPredicates.Count()); Assert.IsInstanceOfType(argument.ValidationPredicates.First(), typeof(StringNotEmptyValidationPredicate)); }
public void AddStringNotEmptyValidationPredicate() { // Arrange. ValidatableArgument<string> argument = new ValidatableArgument<string>("argument", "string"); // Act. argument.IsNotEmpty(); // Assert. Assert.AreEqual(1, argument.ValidationPredicates.Count()); Assert.IsInstanceOfType(argument.ValidationPredicates.First(), typeof(StringNotEmptyValidationPredicate)); }
public void RunInExpectedTime() { // Arrange. ValidatableArgument <string> argument = new ValidatableArgument <string>("argument", "string"); // Act & Assert. Ensure.ActionRunsInExpectedTime( () => { argument.IsNotEmpty(); }, PerformanceConstants.ValidationPredicateExecutionCount, PerformanceConstants.ValidationPredicateTotalExecutionExpectedTime); }
public void RunInExpectedTime() { // Arrange. ValidatableArgument<string> argument = new ValidatableArgument<string>("argument", "string"); // Act & Assert. Ensure.ActionRunsInExpectedTime( () => { argument.IsNotEmpty(); }, PerformanceConstants.ValidationPredicateExecutionCount, PerformanceConstants.ValidationPredicateTotalExecutionExpectedTime); }