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