mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
add test
This commit is contained in:
parent
e108aa18ce
commit
93e113399b
@ -1,8 +1,11 @@
|
|||||||
package cn.hutool.core.date;
|
package cn.hutool.core.date;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.time.format.TextStyle;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
@ -68,4 +71,10 @@ public class MonthTest {
|
|||||||
month = Month.of(java.time.Month.FEBRUARY);
|
month = Month.of(java.time.Month.FEBRUARY);
|
||||||
assertEquals(Month.FEBRUARY, month);
|
assertEquals(Month.FEBRUARY, month);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getDisplayNameTest() {
|
||||||
|
final String displayName = Month.FEBRUARY.getDisplayName(TextStyle.SHORT, Locale.US);
|
||||||
|
Assertions.assertEquals("Feb", displayName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user