Example #1
0
 private static void AssertParsesForField(string expression, int constant)
 {
     try
     {
         SimpleCronExpression cronExpression = new SimpleCronExpression(expression);
         ICollection <int>    set            = cronExpression.GetSetPublic(constant);
         if (set.Count == 0)
         {
             Assert.Fail("Empty field [" + constant + "] returned for " + expression);
         }
     }
     catch (FormatException pe)
     {
         Assert.Fail("Exception thrown during parsing: " + pe);
     }
 }
 private static void AssertParsesForField(string expression, int constant)
 {
     try
     {
         SimpleCronExpression cronExpression = new SimpleCronExpression(expression);
         Collection.ISet<int> set = cronExpression.GetSetPublic(constant);
         if (set.Count == 0)
         {
             Assert.Fail("Empty field [" + constant + "] returned for " + expression);
         }
     }
     catch (FormatException pe)
     {
         Assert.Fail("Exception thrown during parsing: " + pe);
     }
 }