完成 Quarter 和 YearQuarter 的单元测试

This commit is contained in:
2024-12-27 14:52:00 +08:00
parent f7f7bed848
commit 1a76f00b6a
5 changed files with 1110 additions and 70 deletions

View File

@@ -18,6 +18,7 @@ package xyz.zhouxy.plusone.commons.time;
import static org.junit.jupiter.api.Assertions.*;
import java.time.DateTimeException;
import java.time.Month;
import java.time.MonthDay;
@@ -37,7 +38,7 @@ class QuarterTests {
assertEquals(1, quarter.getValue());
assertEquals("Q1", quarter.name());
assertThrows(IllegalArgumentException.class, () -> {
assertThrows(DateTimeException.class, () -> {
Quarter.of(0);
});
@@ -84,7 +85,7 @@ class QuarterTests {
assertEquals(2, quarter.getValue());
assertEquals("Q2", quarter.name());
assertThrows(IllegalArgumentException.class, () -> {
assertThrows(DateTimeException.class, () -> {
Quarter.of(5);
});