Exemple #1
0
        public void SortTest()
        {
            Invite invite1 = GetSimpleInvite();

            invite1.Time = new DateTime(2001, 10, 13);

            Invite invite2 = GetSimpleInvite();

            invite2.Time = new DateTime(2001, 10, 13);

            Invite invite3 = GetSimpleInvite();

            invite3.Time = new DateTime(2003, 10, 13);

            Assert.AreEqual(0, Invite.Sort(invite1, invite2));
            Assert.AreEqual(1, Invite.Sort(invite1, invite3));
            Assert.AreEqual(-1, Invite.Sort(invite3, invite1));
        }