示例#1
0
        public void Making_assertions_about_IComparable_types()
        {
            var apeFoo = new Foo("Ape");
            var monkeyFoo = new Foo("Monkey");

            monkeyFoo.ShouldBeGreaterThan(apeFoo);
            monkeyFoo.ShouldBeAtLeast(apeFoo);

            apeFoo.ShouldBeLessThan(monkeyFoo);
            apeFoo.ShouldBeAtMost(monkeyFoo);

            monkeyFoo.ShouldEqual(monkeyFoo);
            monkeyFoo.ShouldBeAtLeast(monkeyFoo);
            monkeyFoo.ShouldBeAtMost(monkeyFoo);
        }