<dependency> <groupId>org.easytesting</groupId> <artifactId>fest-assert-guava</artifactId> <version>2.0M10</version> <scope>test</scope> </dependency> import static org.fest.assertions.api.Assertions.assertThat; import org.junit.Test; import com.google.common.collect.ImmutableList; public class FluentAssertionsTest { @Test public void testImmutableListAssertion() { ImmutableList<String> list = ImmutableList.of("apple", "banana", "orange"); assertThat(list) .hasSize(3) .contains("apple") .containsExactly("apple", "banana", "orange"); } }


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