package com.cronutils.parser;

import com.cronutils.model.CronType;
import com.cronutils.model.definition.CronDefinitionBuilder;
import org.junit.Before;
import org.junit.Test;
import org.springframework.scheduling.support.CronExpression;

public class CronParserSpringIntegrationTest {
    private CronParser parser;
    @Before
    public void setUp() {
        parser = new CronParser(CronDefinitionBuilder.instanceDefinitionFor(CronType.SPRING));
    }

    @Test
    public void testSpringCronSupportNthDayOfWeek(){
        CronExpression.parse("0 0 0 ? * WED#2");
        parser.parse("0 0 0 ? * WED#2");
    }

}

@@ -451,16 +451,192 @@
 %0A    %7D%0A%0A
+    /**%0A     * The example is adapted from: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/support/CronExpression.html%0A     */%0A
     @Tes
@@ -722,37 +722,37 @@
 arse(%220 0 0 ? * 
-WED#2
+FRI#1
 %22);%0A        pars
@@ -775,13 +775,13 @@
 ? * 
-WED#2
+FRI#1
 %22);%0A

Update test