namespace Deltares.Standard.Specifications { /// /// Checks if the candidate is in between the range boundaries. Boundaries are excluded /// public class InBetweenRangeSpecification : SpecificationBase { private readonly double min; private readonly double max; public InBetweenRangeSpecification(double min, double max) { this.min = min; this.max = max; Name = "In between range specification"; Description = string.Format("The candidate value should have a value between {0} and {1}. Boundaries are excluded", min, max); } /// /// Determines whether the candidate satisfies the specification. /// /// The candidate to test. /// /// true if the candidate satisfies the specification otherwise, false. /// public override bool IsSatisfiedBy(double candidate) { return (min < candidate && max > candidate); } } }