コード例 #1
0
 private static Collection.ISet <int> AssertParsesForField(string expression, int constant)
 {
     try
     {
         TestCronExpression    cronExpression = new TestCronExpression(expression);
         Collection.ISet <int> set            = cronExpression.GetSetPublic(constant);
         if (set.Count == 0)
         {
             Assert.Fail("Empty field [" + constant + "] returned for " + expression);
         }
         return(set);
     }
     catch (FormatException pe)
     {
         Assert.Fail("Exception thrown during parsing: " + pe);
     }
     return(null);  // not reachable
 }
コード例 #2
0
 private static Collection.ISet<int> AssertParsesForField(string expression, int constant)
 {
     try
     {
         TestCronExpression cronExpression = new TestCronExpression(expression);
         Collection.ISet<int> set = cronExpression.GetSetPublic(constant);
         if (set.Count == 0)
         {
             Assert.Fail("Empty field [" + constant + "] returned for " + expression);
         }
         return set;
     }
     catch (FormatException pe)
     {
         Assert.Fail("Exception thrown during parsing: " + pe);
     }
     return null;  // not reachable
 }