예제 #1
0
        public void SecondCompareToReturnsOneIfOtherIsNull()
        {
            const int expected = 1;

            c.Second second = new c.Second(47);
            c.Second other  = null;

            Assert.AreEqual(expected, second.CompareTo(other));
        }
예제 #2
0
        public void SecondCompareToReturnsZeroIfOtherIsSameValue()
        {
            const int expected = 0;

            c.Second second = new c.Second(47);
            c.Second other  = new c.Second(47);

            Assert.AreEqual(expected, second.CompareTo(other));
        }
예제 #3
0
        public void SecondCompareToReturnsMinusOneIfOtherIsMoreThanValue()
        {
            const int expected = -1;

            c.Second second = new c.Second(47);
            c.Second other  = new c.Second(48);

            Assert.AreEqual(expected, second.CompareTo(other));
        }
예제 #4
0
        public void SecondCompareToReturnsOneIfOtherIsNotTypeOfSecond()
        {
            const int expected = 1;

            c.Second second = new c.Second(47);
            Task     other  = new Task(() => { });

            Assert.AreEqual(expected, second.CompareTo(other));
        }