本文整理汇总了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;未经允许,请勿转载。 |
请发表评论