Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:RangeConstraint"/> class.
 /// </summary>
 /// <param name="from">From.</param>
 /// <param name="to">To.</param>
 public RangeConstraint(T from, T to)
     : base(from, to)
 {
     this.from     = from;
     this.to       = to;
     this.comparer = ComparisonAdapter.For(new NUnitComparer <T>());
 }
Example #2
0
 /// <summary>
 /// Modifies the constraint to use a Comparison&lt;T&gt; and returns self.
 /// </summary>
 public CollectionOrderedConstraint Using <T>(Comparison <T> comparer)
 {
     this.comparer     = ComparisonAdapter.For(new CompPclFix <T>(comparer));
     this.comparerName = comparer.GetType().FullName;
     return(this);
 }
Example #3
0
 /// <summary>
 /// Modifies the constraint to use an IComparer and returns self.
 /// </summary>
 public CollectionOrderedConstraint Using(IComparer comparer)
 {
     this.comparer     = ComparisonAdapter.For(comparer);
     this.comparerName = comparer.GetType().FullName;
     return(this);
 }
 /// <summary>
 /// Modifies the constraint to use a Comparison&lt;T&gt; and returns self
 /// </summary>
 public ComparisonConstraint Using<T>(Comparison<T> comparer)
 {
     this.comparer = ComparisonAdapter.For(comparer);
     return this;
 }