<dependency> <groupId>org.easytesting</groupId> <artifactId>fest-assert-guava</artifactId> <version>0.2.1</version> <scope>test</scope> </dependency> import com.google.common.collect.ImmutableList; import org.assertj.guava.api.GuavaAssertions; import org.junit.Test; public class ImmutableListTest { @Test public void testImmutableListAssertions() { ImmutableList<String> list = ImmutableList.of("apple", "banana", "cherry"); GuavaAssertions.assertThat(list).contains("apple") .doesNotContain("grape") .containsExactly("apple", "banana", "cherry"); } }


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