Java 类com.google.common.collect.testing.MinimalIterable 实例源码

项目:guava-mock    文件:SetsTest.java   
public void testImmutableEnumSet_fromIterable() {
  ImmutableSet<SomeEnum> none
      = Sets.immutableEnumSet(MinimalIterable.<SomeEnum>of());
  assertThat(none).isEmpty();

  ImmutableSet<SomeEnum> one
      = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.B));
  assertThat(one).contains(SomeEnum.B);

  ImmutableSet<SomeEnum> two = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.D, SomeEnum.B));
  assertThat(two).containsExactly(SomeEnum.B, SomeEnum.D).inOrder();
}
项目:googles-monorepo-demo    文件:SetsTest.java   
public void testImmutableEnumSet_fromIterable() {
  ImmutableSet<SomeEnum> none
      = Sets.immutableEnumSet(MinimalIterable.<SomeEnum>of());
  assertThat(none).isEmpty();

  ImmutableSet<SomeEnum> one
      = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.B));
  assertThat(one).contains(SomeEnum.B);

  ImmutableSet<SomeEnum> two = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.D, SomeEnum.B));
  assertThat(two).containsExactly(SomeEnum.B, SomeEnum.D).inOrder();
}
项目:guava-libraries    文件:SetsTest.java   
public void testImmutableEnumSet_fromIterable() {
  ImmutableSet<SomeEnum> none
      = Sets.immutableEnumSet(MinimalIterable.<SomeEnum>of());
  assertThat(none).isEmpty();

  ImmutableSet<SomeEnum> one
      = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.B));
  assertThat(one).contains(SomeEnum.B);

  ImmutableSet<SomeEnum> two = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.D, SomeEnum.B));
  assertThat(two).containsExactly(SomeEnum.B, SomeEnum.D).inOrder();
}
项目:guava-libraries    文件:SetsTest.java   
public void testImmutableEnumSet_fromIterable() {
  ImmutableSet<SomeEnum> none
      = Sets.immutableEnumSet(MinimalIterable.<SomeEnum>of());
  assertThat(none).isEmpty();

  ImmutableSet<SomeEnum> one
      = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.B));
  assertThat(one).contains(SomeEnum.B);

  ImmutableSet<SomeEnum> two = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.D, SomeEnum.B));
  assertThat(two).containsExactly(SomeEnum.B, SomeEnum.D).inOrder();
}
项目:guava    文件:SetsTest.java   
public void testImmutableEnumSet_fromIterable() {
  ImmutableSet<SomeEnum> none = Sets.immutableEnumSet(MinimalIterable.<SomeEnum>of());
  assertThat(none).isEmpty();

  ImmutableSet<SomeEnum> one = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.B));
  assertThat(one).contains(SomeEnum.B);

  ImmutableSet<SomeEnum> two = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.D, SomeEnum.B));
  assertThat(two).containsExactly(SomeEnum.B, SomeEnum.D).inOrder();
}
项目:guava    文件:SetsTest.java   
public void testImmutableEnumSet_fromIterable() {
  ImmutableSet<SomeEnum> none = Sets.immutableEnumSet(MinimalIterable.<SomeEnum>of());
  assertThat(none).isEmpty();

  ImmutableSet<SomeEnum> one = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.B));
  assertThat(one).contains(SomeEnum.B);

  ImmutableSet<SomeEnum> two = Sets.immutableEnumSet(MinimalIterable.of(SomeEnum.D, SomeEnum.B));
  assertThat(two).containsExactly(SomeEnum.B, SomeEnum.D).inOrder();
}