Esempio n. 1
0
        public void comparison_asserts_should_use_greaterthan_and_lessthan_overloads_for_classes_that_do_not_implement_icomparable_or_icomparableT()
        {
            Assert.GreaterThan(new DerivedFromOverloadsComparisonOperators(2), new OverloadsComparisonOperators(1));
            Assert.GreaterThanOrEqual(new OverloadsComparisonOperators(2), new DerivedFromOverloadsComparisonOperators(1));
            Assert.GreaterThanOrEqual(new DerivedFromOverloadsComparisonOperators(2), new OverloadsComparisonOperators(2));

            Assert.LessThan(new OverloadsComparisonOperators(1), new DerivedFromOverloadsComparisonOperators(2));
            Assert.LessThanOrEqual(new DerivedFromOverloadsComparisonOperators(1), new OverloadsComparisonOperators(2));
            Assert.LessThanOrEqual(new OverloadsComparisonOperators(2), new DerivedFromOverloadsComparisonOperators(2));
        }
Esempio n. 2
0
 public void a_is_not_greater_than_A_using_case_insensitive_ordinal_comparer_should_fail()
 {
     Assert.Throws <GreaterThanException>(() => Assert.GreaterThan("a", "A", StringComparer.OrdinalIgnoreCase));
 }
Esempio n. 3
0
 public void a_is_not_greater_than_b_should_fail()
 {
     Assert.Throws <GreaterThanException>(() => Assert.GreaterThan("a", "b"));
 }
Esempio n. 4
0
 public void a_is_greater_than_A_using_case_sensitive_ordinal_comparer_should_pass()
 {
     Assert.GreaterThan("a", "A", StringComparer.Ordinal);
 }
Esempio n. 5
0
 public void b_is_greater_than_a_should_pass()
 {
     Assert.GreaterThan("b", "a");
 }
Esempio n. 6
0
 public void Today_is_not_greater_than_tomorrow_should_fail()
 {
     Assert.Throws <GreaterThanException>(() => Assert.GreaterThan(today, tomorrow));
 }
Esempio n. 7
0
 public void Tomorrow_is_greater_than_today_should_pass()
 {
     Assert.GreaterThan(tomorrow, today);
 }
Esempio n. 8
0
 public void One_is_not_greater_than_two_should_fail()
 {
     Assert.Throws <GreaterThanException>(() => Assert.GreaterThan(1, 2));
 }
Esempio n. 9
0
 public void Two_is_greater_than_one_should_pass()
 {
     Assert.GreaterThan(2, 1);
 }