public void TestEmptyConstructor()
        {
            // Send in a null.
            CronSpecification cs = new CronSpecification(null);
            Assert.IsTrue(cs.IsDateEffective(ConvertDate(JANUARY_1_2009)));

            // Send in an empty string
            cs = new CronSpecification("");
            Assert.IsTrue(cs.IsDateEffective(ConvertDate(JANUARY_1_2009)));

            // Use the default constructor
            cs = new CronSpecification();
            Assert.IsTrue(cs.IsDateEffective(ConvertDate(JANUARY_1_2009)));
        }
 public void TestIsFullSpecEffective()
 {
     CronSpecification cs = new CronSpecification(FULL_SPEC);
     Assert.IsTrue(cs.IsDateEffective(ConvertDate(JANUARY_1_2009)));
 }
 public void TestIsDOWFourDateEffective()
 {
     CronSpecification cs = new CronSpecification(DOW_FOUR);
     Assert.IsTrue(cs.IsDateEffective(ConvertDate(JANUARY_1_2009)));
 }
 public void TestIsDayOneDateEffective()
 {
     CronSpecification cs = new CronSpecification(DAY_ONE);
     Assert.IsTrue(cs.IsDateEffective(ConvertDate(JANUARY_1_2009)));
 }
 public void TestHourlyShortcut()
 {
     CronSpecification cs = new CronSpecification("@hourly");
     Assert.IsTrue(cs.IsDateEffective(ConvertDate(MAY_24_2009_MIDNIGHT)));
 }
 public void TestAnnuallyShortcut()
 {
     CronSpecification cs = new CronSpecification("@annually");
     Assert.IsTrue(cs.IsDateEffective(ConvertDate(JANUARY_1_2009_MIDNIGHT)));
 }
 public void IsFullWrongSpecNotEffective()
 {
     CronSpecification cs = new CronSpecification(FULL_WRONG_SPEC);
     Assert.IsFalse(cs.IsDateEffective(ConvertDate(JANUARY_1_2009)));
 }
 public void TestIsValidComboEffective()
 {
     CronSpecification cs = new CronSpecification(VALID_COMBO);
     Assert.IsTrue(cs.IsDateEffective(ConvertDate(MARCH_3_2009)));
 }
 public void TestIsValidAllStepsEffective()
 {
     CronSpecification cs = new CronSpecification(VALID_ALL_STEPS);
     Assert.IsTrue(cs.IsDateEffective(ConvertDate(MARCH_3_2009)));
 }
 public void TestIsValidAllRangesEffective()
 {
     CronSpecification cs = new CronSpecification(VALID_ALL_RANGES);
     Assert.IsTrue(cs.IsDateEffective(ConvertDate(JANUARY_1_2009)));
 }