However, you can try searching for the following topics in Chinese to find articles related to the technical principles of FEST Fluent Assertions For Joda Time framework in Java class libraries:

<dependency> <groupId>org.easytesting</groupId> <artifactId>fest-util</artifactId> <version>1.2.5</version> <scope>test</scope> </dependency> <dependency> <groupId>org.easytesting</groupId> <artifactId>fest-assert</artifactId> <version>1.4</version> <scope>test</scope> </dependency> <dependency> <groupId>org.joda</groupId> <artifactId>joda-time</artifactId> <version>2.10.10</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13.2</version> <scope>test</scope> </dependency> groovy testCompile 'org.easytesting:fest-util:1.2.5' testCompile 'org.easytesting:fest-assert:1.4' testCompile 'org.joda:joda-time:2.10.10' testCompile 'junit:junit:4.13.2' import static org.fest.assertions.api.Assertions.assertThat; import org.joda.time.DateTime; import org.junit.Test; public class DateTimeTest { @Test public void testDateTimeAssertions() { DateTime dateTime = new DateTime(2022, 1, 1, 12, 0, 0); assertThat(dateTime).isYear(2022); assertThat(dateTime).isAfter(new DateTime(2021, 12, 31, 23, 59, 59)); } }


上一篇:
下一篇:
切换中文