Ejemplo 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));
        }
Ejemplo 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));
 }
Ejemplo n.º 3
0
 public void a_is_not_greater_than_b_should_fail()
 {
     Assert.Throws <GreaterThanException>(() => Assert.GreaterThan("a", "b"));
 }
Ejemplo n.º 4
0
 public void a_is_greater_than_A_using_case_sensitive_ordinal_comparer_should_pass()
 {
     Assert.GreaterThan("a", "A", StringComparer.Ordinal);
 }
Ejemplo n.º 5
0
 public void b_is_greater_than_a_should_pass()
 {
     Assert.GreaterThan("b", "a");
 }
Ejemplo n.º 6
0
 public void Today_is_not_greater_than_tomorrow_should_fail()
 {
     Assert.Throws <GreaterThanException>(() => Assert.GreaterThan(today, tomorrow));
 }
Ejemplo n.º 7
0
 public void Tomorrow_is_greater_than_today_should_pass()
 {
     Assert.GreaterThan(tomorrow, today);
 }
Ejemplo n.º 8
0
 public void One_is_not_greater_than_two_should_fail()
 {
     Assert.Throws <GreaterThanException>(() => Assert.GreaterThan(1, 2));
 }
Ejemplo n.º 9
0
 public void Two_is_greater_than_one_should_pass()
 {
     Assert.GreaterThan(2, 1);
 }