Esempio n. 1
0
        public void bigRangeDateTest()
        {
            DateTime dt1 = new DateTime(1, 1, 1);
            DateTime dt2 = new DateTime(9999, 12, 12);
            d = new FieldNode(2, "name", "DDMMYYYY", dt1, dt2);

            string sDate;

            for (int i = 0; i < 10000; i++)
            {
                sDate = d.getRndDate();
                DateTime dt = DateTime.Parse(sDate);
                Assert.Greater(dt, dt1);
                Assert.Greater(dt2, dt);
            }
        }
Esempio n. 2
0
 public void wrongFormatDateTest()
 {
     DateTime dt1 = new DateTime(2014, 1, 1);
     DateTime dt2 = new DateTime(2015, 12, 12);
     d = new FieldNode(2, "name", "DDMMMYYYYYYY", dt1, dt2);
     string sDate = d.getRndDate();
     DateTime dt = DateTime.Parse(sDate);
     Assert.Greater(dt, dt1);
     Assert.Greater(dt2, dt);
 }