public void CanCompareIComparables()
        {
            ClassWithIComparable expected = new ClassWithIComparable(0);
            ClassWithIComparable actual   = new ClassWithIComparable(42);

            Assert.That(actual, Is.GreaterThanOrEqualTo(expected));
        }
        public void CanCompareIComparables()
        {
            ClassWithIComparable expected = new ClassWithIComparable(42);
            ClassWithIComparable actual   = new ClassWithIComparable(0);

            Assert.That(actual, Is.LessThan(expected));
        }
        public int CompareTo(object x)
        {
            ClassWithIComparable other = x as ClassWithIComparable;

            if (x is ClassWithIComparable)
            {
                return(val.CompareTo(other.val));
            }

            throw new ArgumentException();
        }