Skip to content

Commit

Permalink
Add test for issue jmrozanec#605
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-anufriev committed Jul 21, 2023
1 parent d31697e commit e38d2e2
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/test/java/com/cronutils/Issue605Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.cronutils;

import com.cronutils.mapper.CronMapper;
import com.cronutils.model.Cron;
import com.cronutils.model.CronType;
import com.cronutils.model.definition.CronDefinitionBuilder;
import com.cronutils.parser.CronParser;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;

public class Issue605Test {

private CronParser cronParser;

@BeforeEach
public void setUp() {
this.cronParser = new CronParser(CronDefinitionBuilder.instanceDefinitionFor(CronType.SPRING));
}

@Test
public void testDayOfWeekMapping() {
Cron cron = this.cronParser.parse("0 0 0 ? * 5#1");
CronMapper mapper = CronMapper.fromSpringToQuartz();
assertDoesNotThrow(() -> mapper.map(cron));
}

}

0 comments on commit e38d2e2

Please sign in to comment.