예제 #1
0
 private static void AddAssertion(Action <IComparable, IComparable> method, ShouldBeAssertion <T> self, T actual, T expected)
 {
     if (!(actual is IComparable))
     {
         throw new ArgumentException("Expected IComparable but got " + typeof(T).FullName);
     }
     if (!(expected is IComparable))
     {
         throw new ArgumentException("Expected IComparable but got " + typeof(T).FullName);
     }
     self.AddAssertion(() => method((IComparable)actual, (IComparable)expected));
 }
 public RangeConjunctionAssertion(ShouldBeAssertion <T> assertion, T leftHandValue)
     : base(assertion)
 {
     this.assertion     = assertion;
     this.leftHandValue = leftHandValue;
 }