コード例 #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);
        }
コード例 #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);
        }