public void GetDateFromPattern() { Assert.IsNull(BaseRecurrency.GetDateFromPattern("00000000", 0)); Assert.AreEqual(new DateTime(2011, 5, 30), BaseRecurrency.GetDateFromPattern("20110530", 0)); Assert.AreEqual(new DateTime(2011, 5, 30), BaseRecurrency.GetDateFromPattern("D20110530xxxx", 1)); }
private void CheckEquals_Base(RecurrencyInfo info, BaseRecurrency recurrency) { Assert.AreEqual(recurrency.StartDate, info.StartDate); Assert.AreEqual(recurrency.EndDate, info.EndDate); Assert.AreEqual(recurrency.Occurrences, info.Occurrences); }
public void GetIntFromPattern() { Assert.AreEqual(2011, BaseRecurrency.GetIntFromPattern("20110530", 0, 4)); Assert.AreEqual(530, BaseRecurrency.GetIntFromPattern("D20110530xxxx", 5, 4)); }