Пример #1
0
        public void Compare_PersianDate_With_Comparer_Method()
        {
            PersianDate pd1 = new PersianDate(1384, 10, 1);
            PersianDate pd2 = new PersianDate(1389, 12, 25);
            PersianDate pd3 = new PersianDate(1389, 12, 25);

            Assert.AreEqual(1, pd1.Compare(pd2, pd1));
            Assert.AreEqual(-1, pd2.Compare(pd1, pd2));
            Assert.AreEqual(0, pd1.Compare(pd1, pd1));
        }
Пример #2
0
        public void Compare_PersianDate_With_Comparer_Method()
        {
            PersianDate pd1 = new PersianDate(1384, 10, 1);
            PersianDate pd2 = new PersianDate(1389, 12, 25);
            PersianDate pd3 = new PersianDate(1389, 12, 25);

            Assert.AreEqual(1, pd1.Compare(pd2, pd1));
            Assert.AreEqual(-1, pd2.Compare(pd1, pd2));
            Assert.AreEqual(0, pd1.Compare(pd1, pd1));
        }