コード例 #1
0
        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));
        }
コード例 #2
0
 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);
 }
コード例 #3
0
 public void GetIntFromPattern()
 {
     Assert.AreEqual(2011, BaseRecurrency.GetIntFromPattern("20110530", 0, 4));
     Assert.AreEqual(530, BaseRecurrency.GetIntFromPattern("D20110530xxxx", 5, 4));
 }