Skip to content

Commit 887d714

Browse files
committed
#481 Reset state of all default temporal type unit tests
1 parent aac8c1c commit 887d714

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/java/ch/jalu/configme/properties/types/TemporalTypeTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package ch.jalu.configme.properties.types;
22

33
import ch.jalu.configme.properties.convertresult.ConvertErrorRecorder;
4+
import org.junit.jupiter.api.AfterAll;
45
import org.junit.jupiter.api.Test;
6+
import org.junit.jupiter.api.extension.ExtendWith;
7+
import org.mockito.junit.jupiter.MockitoExtension;
58

69
import java.time.LocalDate;
710
import java.time.LocalDateTime;
@@ -19,8 +22,17 @@
1922
/**
2023
* Test for {@link TemporalType}.
2124
*/
25+
@ExtendWith(MockitoExtension.class)
2226
public class TemporalTypeTest {
2327

28+
@AfterAll
29+
static void reset() {
30+
ConvertErrorRecorder errorRecorder = new ConvertErrorRecorder();
31+
TemporalType.LOCAL_DATE.convert("1970-01-01", errorRecorder);
32+
TemporalType.LOCAL_TIME.convert("12:00:00", errorRecorder);
33+
TemporalType.LOCAL_DATE_TIME.convert("1970-01-01 12:00:00", errorRecorder);
34+
}
35+
2436
@Test
2537
void shouldNotAllowToInstantiateTemporalTypeWithInvalidArguments() {
2638
// when

0 commit comments

Comments
 (0)