import static com.google.common.truth.Truth.assertThat; public class ExampleTest { @Test public void testStringEquality() { String expected = "Hello"; String actual = "Hello"; assertThat(actual).isEqualTo(expected); } } <dependency> <groupId>com.google.truth</groupId> <artifactId>truth</artifactId> <version>1.0.1</version> <scope>test</scope> </dependency>


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