本文整理了Java中org.assertj.core.api.AbstractIterableAssert.as()
方法的一些代码示例,展示了AbstractIterableAssert.as()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractIterableAssert.as()
方法的具体详情如下:
包路径:org.assertj.core.api.AbstractIterableAssert
类名称:AbstractIterableAssert
方法名:as
暂无
代码示例来源:origin: org.assertj/assertj-core
@Override
@CheckReturnValue
public SELF as(Description description) {
return super.as(description);
}
代码示例来源:origin: org.assertj/assertj-core
@Override
@CheckReturnValue
public SELF as(String description, Object... args) {
return super.as(description, args);
}
代码示例来源:origin: joel-costigliola/assertj-core
@Override
@CheckReturnValue
public SELF as(Description description) {
return super.as(description);
}
代码示例来源:origin: joel-costigliola/assertj-core
@Override
@CheckReturnValue
public SELF as(String description, Object... args) {
return super.as(description, args);
}
代码示例来源:origin: gentics/mesh
/**
* Assert that the branch is tagged with the given tags (possibly among others)
* @param tags tag names
* @return fluent API
*/
public BranchResponseAssert isTagged(String... tags) {
Set<String> tagNames = actual.getTags().stream().map(TagReference::getName).collect(Collectors.toSet());
assertThat(tagNames).as(descriptionText() + " tags").contains(tags);
return this;
}
代码示例来源:origin: gentics/mesh
/**
* Assert that the branch is only tagged with the given tags
* @param tags tag names
* @return fluent API
*/
public BranchResponseAssert isOnlyTagged(String... tags) {
Set<String> tagNames = actual.getTags().stream().map(TagReference::getName).collect(Collectors.toSet());
assertThat(tagNames).as(descriptionText() + " tags").containsOnly(tags);
return this;
}
}
代码示例来源:origin: gentics/mesh
/**
* Assert that the branch is not tagged with any of the given tags
* @param tags tag names
* @return fluent API
*/
public BranchResponseAssert isNotTagged(String... tags) {
Set<String> tagNames = actual.getTags().stream().map(TagReference::getName).collect(Collectors.toSet());
assertThat(tagNames).as(descriptionText() + " tags").doesNotContain(tags);
return this;
}
代码示例来源:origin: gentics/mesh
/**
* Assert that the branch is not tagged with any of the given tags
* @param tags tag names
* @return fluent API
*/
public BranchAssert isNotTagged(String... tags) {
Set<String> tagNames = actual.getTags().stream().map(Tag::getName).collect(Collectors.toSet());
assertThat(tagNames).as(descriptionText() + " tags").doesNotContain(tags);
return this;
}
代码示例来源:origin: gentics/mesh
/**
* Assert that the branch is tagged with the given tags (possibly among others)
* @param tags tag names
* @return fluent API
*/
public BranchAssert isTagged(String... tags) {
Set<String> tagNames = actual.getTags().stream().map(Tag::getName).collect(Collectors.toSet());
assertThat(tagNames).as(descriptionText() + " tags").contains(tags);
return this;
}
代码示例来源:origin: gentics/mesh
/**
* Assert that the branch is only tagged with the given tags
* @param tags tag names
* @return fluent API
*/
public BranchAssert isOnlyTagged(String... tags) {
Set<String> tagNames = actual.getTags().stream().map(Tag::getName).collect(Collectors.toSet());
assertThat(tagNames).as(descriptionText() + " tags").containsOnly(tags);
return this;
}
}
代码示例来源:origin: xing/xing-android-sdk
public void assertNoEvents() {
assertThat(events).as("Unconsumed events found!").isEmpty();
}
代码示例来源:origin: gentics/mesh
/**
* Assert that the field container has no next container
*
* @param container
* @return fluent API
*/
public NodeGraphFieldContainerAssert isLast() {
assertThat(actual.getNextVersions()).as(descriptionText() + " next container").isEmpty();
return this;
}
代码示例来源:origin: SonarSource/sonar-php
/**
* Checks the existence of a symbol at the specified location.
* @param line the line of the symbol
* @param column any column of the symbol
*/
public void checkSymbolExistence(SensorContextTester context, int line, int column) {
Collection<TextRange> foundReferences = context.referencesForSymbolAt(componentKey, line, column);
String message = "a symbol is expected to exist and have references at line " + line + " and column " + column;
assertThat(foundReferences).as(message).isNotNull();
}
代码示例来源:origin: SonarSource/sonar-php
public void checkNoSymbolExists(SensorContextTester context, int line, int column) {
Collection<TextRange> foundReferences = context.referencesForSymbolAt(componentKey, line, column);
String message = "no symbol is expected to exist at line " + line + " and column " + column;
assertThat(foundReferences).as(message).isNull();
}
代码示例来源:origin: gentics/mesh
/**
* Assert that the field container has the given next container
*
* @param container
* @return fluent API
*/
public NodeGraphFieldContainerAssert hasNext(NodeGraphFieldContainer container) {
Iterable<NodeGraphFieldContainer> next = (Iterable<NodeGraphFieldContainer>) actual.getNextVersions();
assertThat(next).as(descriptionText() + " next container").isNotNull().usingFieldByFieldElementComparator().contains(container);
return this;
}
代码示例来源:origin: gentics/mesh
/**
* Assert that the node has none of the given nodes as children in the branch.
*
* @param branch
* branch
* @param nodes
* list of nodes
* @return fluent API
*/
public NodeAssert hasNotChildren(Branch branch, Node... nodes) {
assertThat(actual.getChildren(branch.getUuid())).as(descriptionText() + " children").usingElementComparatorOnFields("uuid").doesNotContain(
nodes);
return this;
}
代码示例来源:origin: airlift/drift
@Test
public void testLegacyIdCorrectlyAnnotated()
{
ThriftStructMetadataBuilder builder = new ThriftStructMetadataBuilder(new ThriftCatalog(), LegacyIdCorrect.class);
ThriftStructMetadata metadata = builder.build();
Set<Integer> seen = new HashSet<>();
for (ThriftFieldMetadata field : metadata.getFields()) {
seen.add((int) field.getId());
}
assertThat(seen)
.as("fields found in LegacyIdCorrect")
.isEqualTo(LegacyIdCorrect.IDS);
}
代码示例来源:origin: airlift/drift
@Test
public void testLegacyIdOnUnion()
{
ThriftUnionMetadataBuilder builder = new ThriftUnionMetadataBuilder(new ThriftCatalog(), LegacyIdUnionCorrect.class);
ThriftStructMetadata metadata = builder.build();
Set<Integer> seen = new HashSet<>();
for (ThriftFieldMetadata field : metadata.getFields()) {
seen.add((int) field.getId());
}
assertThat(seen)
.as("fields found in LegacyIdUnionCorrect")
.isEqualTo(LegacyIdUnionCorrect.IDS);
}
代码示例来源:origin: io.airlift.drift/drift-codec
@Test
public void testLegacyIdOnUnion()
{
ThriftUnionMetadataBuilder builder = new ThriftUnionMetadataBuilder(new ThriftCatalog(), LegacyIdUnionCorrect.class);
ThriftStructMetadata metadata = builder.build();
Set<Integer> seen = new HashSet<>();
for (ThriftFieldMetadata field : metadata.getFields()) {
seen.add((int) field.getId());
}
assertThat(seen)
.as("fields found in LegacyIdUnionCorrect")
.isEqualTo(LegacyIdUnionCorrect.IDS);
}
代码示例来源:origin: io.airlift.drift/drift-codec
@Test
public void testLegacyIdCorrectlyAnnotated()
{
ThriftStructMetadataBuilder builder = new ThriftStructMetadataBuilder(new ThriftCatalog(), LegacyIdCorrect.class);
ThriftStructMetadata metadata = builder.build();
Set<Integer> seen = new HashSet<>();
for (ThriftFieldMetadata field : metadata.getFields()) {
seen.add((int) field.getId());
}
assertThat(seen)
.as("fields found in LegacyIdCorrect")
.isEqualTo(LegacyIdCorrect.IDS);
}
内容来源于网络,如有侵权,请联系作者删除!