Esempio n. 1
0
        public void DateCompareToReturnsMinusOneIfOtherIsMoreThanValue()
        {
            const int expected = -1;

            c.Date date  = new c.Date(47);
            c.Date other = new c.Date(48);

            Assert.AreEqual(expected, date.CompareTo(other));
        }
Esempio n. 2
0
        public void DateCompareToReturnsOneIfOtherIsNotTypeOfDate()
        {
            const int expected = 1;

            c.Date date  = new c.Date(47);
            Task   other = new Task(() => { });

            Assert.AreEqual(expected, date.CompareTo(other));
        }
Esempio n. 3
0
        public void DateCompareToReturnsZeroIfOtherIsSameValue()
        {
            const int expected = 0;

            c.Date date  = new c.Date(47);
            c.Date other = new c.Date(47);

            Assert.AreEqual(expected, date.CompareTo(other));
        }
Esempio n. 4
0
        public void DateCompareToReturnsOneIfOtherIsNull()
        {
            const int expected = 1;

            c.Date date  = new c.Date(47);
            c.Date other = null;

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