Beispiel #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testSimpleDurationWithStartDate() throws Exception
        public virtual void testSimpleDurationWithStartDate()
        {
            CycleBusinessCalendar businessCalendar = new CycleBusinessCalendar();

            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy MM dd - HH:mm");
            DateTime         now = simpleDateFormat.parse("2010 06 11 - 17:23");

            DateTime duedate = businessCalendar.resolveDuedate("R/P2DT5H70M", now);

            DateTime expectedDuedate = simpleDateFormat.parse("2010 06 13 - 23:33");

            assertEquals(expectedDuedate, duedate);
        }
Beispiel #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testSimpleCronWithStartDate() throws Exception
        public virtual void testSimpleCronWithStartDate()
        {
            CycleBusinessCalendar businessCalendar = new CycleBusinessCalendar();

            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy MM dd - HH:mm");
            DateTime         now = simpleDateFormat.parse("2011 03 11 - 17:23");

            DateTime duedate = businessCalendar.resolveDuedate("0 0 0 1 * ?", now);

            DateTime expectedDuedate = simpleDateFormat.parse("2011 04 1 - 00:00");

            assertEquals(expectedDuedate, duedate);
        }
        public virtual void TestSimpleCron()
        {
            var businessCalendar = new CycleBusinessCalendar();

            //SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy MM dd - HH:mm");
            var now = DateTime.Parse("2011 03 11 - 17:23");

            ClockUtil.CurrentTime = now;

            var duedate = businessCalendar.ResolveDuedate("0 0 0 1 * ?");

            var expectedDuedate = DateTime.Parse("2011 04 1 - 00:00");

            Assert.AreEqual(expectedDuedate, duedate);
        }
        public virtual void TestSimpleDuration()
        {
            var businessCalendar = new CycleBusinessCalendar();

            //SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy MM dd - HH:mm");
            var now = DateTime.Parse("2010 06 11 - 17:23");

            ClockUtil.CurrentTime = now;

            var duedate = businessCalendar.ResolveDuedate("R/P2DT5H70M");

            var expectedDuedate = DateTime.Parse("2010 06 13 - 23:33");

            Assert.AreEqual(expectedDuedate, duedate);
        }