public void AddFloatNaNValidationPredicate() { // Arrange. ValidatableArgument<float> argument = new ValidatableArgument<float>("argument", 5); // Act. argument.IsNaN(); // Assert. Assert.AreEqual(1, argument.ValidationPredicates.Count()); Assert.IsInstanceOfType(argument.ValidationPredicates.First(), typeof(FloatNaNValidationPredicate)); }
public void AddFloatNaNValidationPredicate() { // Arrange. ValidatableArgument <float> argument = new ValidatableArgument <float>("argument", 5); // Act. argument.IsNaN(); // Assert. Assert.AreEqual(1, argument.ValidationPredicates.Count()); Assert.IsInstanceOfType(argument.ValidationPredicates.First(), typeof(FloatNaNValidationPredicate)); }
public void RunInExpectedTime() { // Arrange. ValidatableArgument<float> argument = new ValidatableArgument<float>("argument", 5); // Act & Assert. Ensure.ActionRunsInExpectedTime( () => { argument.IsNaN(); }, PerformanceConstants.ValidationPredicateExecutionCount, PerformanceConstants.ValidationPredicateTotalExecutionExpectedTime); }
public void RunInExpectedTime() { // Arrange. ValidatableArgument <float> argument = new ValidatableArgument <float>("argument", 5); // Act & Assert. Ensure.ActionRunsInExpectedTime( () => { argument.IsNaN(); }, PerformanceConstants.ValidationPredicateExecutionCount, PerformanceConstants.ValidationPredicateTotalExecutionExpectedTime); }