public void Compare_PersianDate_With_CompareTo_Method() { PersianDate pd1 = new PersianDate(1384, 10, 1); PersianDate pd2 = new PersianDate(1389, 12, 25); Assert.AreEqual(1, pd2.CompareTo(pd1)); Assert.AreEqual(-1, pd1.CompareTo(pd2)); Assert.AreEqual(-1, pd1.CompareTo(pd2)); }
public void Comparing_Equal_PersianDates_Using_CompareTo() { PersianDate pd1 = new PersianDate(1384, 1, 29, 20, 20, 10, 21); PersianDate pd2 = new PersianDate(1384, 1, 29, 20, 20, 10, 21); var diff = pd1.CompareTo(pd2); Assert.AreEqual(0, diff); }