Skip to content

Commit

Permalink
Merge pull request #451 from IndeedSi/403-incorrect-description-on-ev…
Browse files Browse the repository at this point in the history
…ery-expression-test

Add a test case for #403
  • Loading branch information
jmrozanec committed Oct 12, 2020
2 parents 2302af5 + e096803 commit 5bf4076
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/java/com/cronutils/Issue403Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.cronutils;

import com.cronutils.descriptor.CronDescriptor;
import com.cronutils.model.CronType;
import com.cronutils.model.definition.CronDefinitionBuilder;
import com.cronutils.parser.CronParser;
import org.junit.Ignore;
import org.junit.Test;

import java.util.Locale;

import static org.junit.Assert.assertEquals;

@Ignore
public class Issue403Test {
@Test
public void test() {
CronParser parser = new CronParser( CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ));
CronDescriptor cd = CronDescriptor.instance(Locale.US);
assertEquals("every minute every 2 hours", cd.describe(parser.parse("0 * 0/2 * * ?")));
assertEquals("every minute every hour every 2 days", cd.describe(parser.parse("0 * * 1/2 * ?")));
}
}

0 comments on commit 5bf4076

Please sign in to comment.