• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IterableSubject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.common.truth.IterableSubject的典型用法代码示例。如果您正苦于以下问题:Java IterableSubject类的具体用法?Java IterableSubject怎么用?Java IterableSubject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IterableSubject类属于com.google.common.truth包,在下文中一共展示了IterableSubject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: assertThatNameList

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
public static IterableSubject assertThatNameList(Iterable<ProjectInfo> actualIt) {
  List<ProjectInfo> actual = ImmutableList.copyOf(actualIt);
  for (ProjectInfo info : actual) {
    assertWithMessage("missing project name").that(info.name).isNotNull();
    assertWithMessage("project name does not match id")
        .that(Url.decode(info.id))
        .isEqualTo(info.name);
  }
  return assertThat(Iterables.transform(actual, p -> new Project.NameKey(p.name)));
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:11,代码来源:ProjectAssert.java


示例2: assertExecutionPlatformLabels

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
protected static IterableSubject assertExecutionPlatformLabels(
    RegisteredExecutionPlatformsValue registeredExecutionPlatformsValue) {
  assertThat(registeredExecutionPlatformsValue).isNotNull();
  ImmutableList<PlatformInfo> declaredExecutionPlatforms =
      registeredExecutionPlatformsValue.registeredExecutionPlatforms();
  List<Label> labels = collectExecutionPlatformLabels(declaredExecutionPlatforms);
  return assertThat(labels);
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:9,代码来源:RegisteredExecutionPlatformsFunctionTest.java


示例3: assertToolchainLabels

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
protected static IterableSubject assertToolchainLabels(
    RegisteredToolchainsValue registeredToolchainsValue) {
  assertThat(registeredToolchainsValue).isNotNull();
  ImmutableList<DeclaredToolchainInfo> declaredToolchains =
      registeredToolchainsValue.registeredToolchains();
  List<Label> labels = collectToolchainLabels(declaredToolchains);
  return assertThat(labels);
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:9,代码来源:ToolchainTestCase.java


示例4: assertStream

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
private static <K, V> IterableSubject assertStream(Stream<?> stream) {
  return assertThat(stream.collect(toList()));
}
 
开发者ID:google,项目名称:mug,代码行数:4,代码来源:BiStreamTest.java


示例5: shutdownAndAssertInterruptedKeys

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
private IterableSubject shutdownAndAssertInterruptedKeys() throws InterruptedException {
  shutdownThreadPool();  // Allow left-over threads to respond to interruptions.
  return assertThat(interrupted);
}
 
开发者ID:google,项目名称:mug,代码行数:5,代码来源:ParallelizerTest.java


示例6: assertStream

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
private static <T, E extends Throwable> IterableSubject assertStream(
    Stream<Maybe<T, E>> stream) throws E {
  return assertThat(collect(stream));
}
 
开发者ID:google,项目名称:mug,代码行数:5,代码来源:MaybeTest.java


示例7: assertThat

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
static IterableSubject assertThat(Stream<?> stream) {
  return Truth.assertThat(stream.toArray()).asList();
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:4,代码来源:FluentIterableTest.java


示例8: assertThat

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
private static IterableSubject assertThat(Stream<?> stream) {
  return Truth.assertThat(stream.toArray()).asList();
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:4,代码来源:StreamsTest.java


示例9: makeUnmodifiable

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
private static IterableSubject makeUnmodifiable(Collection<?> actual) {
  return assertThat(Collections.<Object>unmodifiableCollection(actual));
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:4,代码来源:TypeTokenTest.java


示例10: assertThat

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
@NonNull
public static IterableSubject assertThat(@NonNull final DoubleStream stream) {
  return Truth.assertThat(Doubles.asList(stream.toArray()));
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:5,代码来源:MathAssert.java


示例11: assertThat

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
private static <T> IterableSubject assertThat(ImmutableList<T> subject) {
  return Truth.assertThat(subject);
}
 
开发者ID:bazelbuild,项目名称:rules_closure,代码行数:4,代码来源:WebpathTest.java


示例12:

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
public static <T, C extends Iterable<T>> IterableSubject<? extends IterableSubject<?, T, C>, T, C>
assertThat(@Nullable Iterable<T> target) {
    return assert_().that(target);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TruthHelper.java


示例13: makeUnmodifiable

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
private static IterableSubject<?, Object, ?> makeUnmodifiable(Collection<?> actual) {
  return assertThat(Collections.<Object>unmodifiableCollection(actual));
}
 
开发者ID:sander120786,项目名称:guava-libraries,代码行数:4,代码来源:TypeTokenTest.java


示例14: assertThatGet

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
private IterableSubject assertThatGet(PushOneCommit.Result r) throws Exception {
  return assertThat(gApi.changes().id(r.getChange().getId().get()).getHashtags());
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:4,代码来源:HashtagsIT.java


示例15: containsAllOf

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
@BeforeTemplate
static void containsAllOf(IterableSubject subject, Collection<?> expected) {
  subject.hasSize(expected.size());
  subject.containsAllIn(expected);
}
 
开发者ID:google,项目名称:error-prone,代码行数:6,代码来源:WildcardUnificationTemplate.java


示例16: containsExactly

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
@AfterTemplate
static void containsExactly(IterableSubject subject, Collection<?> expected) {
  subject.containsExactlyElementsIn(expected);
}
 
开发者ID:google,项目名称:error-prone,代码行数:5,代码来源:WildcardUnificationTemplate.java


示例17: hasDirectDepsInGraphThat

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
public IterableSubject hasDirectDepsInGraphThat(SkyKey parent) throws InterruptedException {
  return assertThat(
          getSubject().getWalkableGraph().getDirectDeps(ImmutableList.of(parent)).get(parent))
      .named("Direct deps for " + parent + " in " + getDisplaySubject());
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:6,代码来源:EvaluationResultSubject.java


示例18: hasReverseDepsInGraphThat

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
public IterableSubject hasReverseDepsInGraphThat(SkyKey child) throws InterruptedException {
  return assertThat(
          getSubject().getWalkableGraph().getReverseDeps(ImmutableList.of(child)).get(child))
      .named("Reverse deps for " + child + " in " + getDisplaySubject());
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:6,代码来源:EvaluationResultSubject.java


示例19: hasPathToCycleThat

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
public IterableSubject hasPathToCycleThat() {
  return Truth.assertThat(getSubject().getPathToCycle())
      .named("Path to cycle in " + getDisplaySubject());
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:5,代码来源:CycleInfoSubject.java


示例20: hasCycleThat

import com.google.common.truth.IterableSubject; //导入依赖的package包/类
public IterableSubject hasCycleThat() {
  return Truth.assertThat(getSubject().getCycle()).named("Cycle in " + getDisplaySubject());
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:4,代码来源:CycleInfoSubject.java



注:本文中的com.google.common.truth.IterableSubject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java NameID类代码示例发布时间:2022-05-21
下一篇:
Java Blaze类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap