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_greater_than_or_equal_to_A_using_case_insensitive_ordinal_comparer_should_pass()
 {
     Assert.GreaterThanOrEqual("a", "A", StringComparer.OrdinalIgnoreCase);
 }
Ejemplo n.º 3
0
 public void a_is_not_greater_than_or_equal_to_b_should_fail()
 {
     Assert.Throws <GreaterThanOrEqualException>(() => Assert.GreaterThanOrEqual("a", "b"));
 }
Ejemplo n.º 4
0
 public void b_is_greater_than_or_equal_to_a_should_pass()
 {
     Assert.GreaterThanOrEqual("b", "a");
 }
Ejemplo n.º 5
0
 public void Today_is_not_greater_than_or_equal_to_tomorrow_should_fail()
 {
     Assert.Throws <GreaterThanOrEqualException>(() => Assert.GreaterThanOrEqual(today, tomorrow));
 }
Ejemplo n.º 6
0
 public void Tomorrow_is_greater_than_or_equal_to_today_should_pass()
 {
     Assert.GreaterThanOrEqual(tomorrow, today);
 }
Ejemplo n.º 7
0
 public void One_is_not_greater_than_or_equal_to_two_should_fail()
 {
     Assert.Throws <GreaterThanOrEqualException>(() => Assert.GreaterThanOrEqual(1, 2));
 }
Ejemplo n.º 8
0
 public void Two_is_greater_than_or_equal_to_one_should_pass()
 {
     Assert.GreaterThanOrEqual(2, 1);
 }
Ejemplo n.º 9
0
        public void should_test_equality_if_niether_icomparable_and_icomparableT_are_implemented()
        {
            var obj = new ClassWithNoComparisonBehavior();

            Assert.GreaterThanOrEqual(obj, obj);
        }