本文整理汇总了Java中org.assertj.core.api.ListAssert类的典型用法代码示例。如果您正苦于以下问题:Java ListAssert类的具体用法?Java ListAssert怎么用?Java ListAssert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ListAssert类属于org.assertj.core.api包,在下文中一共展示了ListAssert类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: assertChanges
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
public ChangesTestSubscriber assertChanges(Consumer<ListAssert<Tuple>> consumer) {
consumer.accept(
assertThat(values())
.extracting(
it -> DurationFormatUtils.formatDuration(it.time(MILLISECONDS), "ss:SSS", true),
it -> getPathString(it.value()),
it -> it.value().getData()
));
return this;
}
示例2: it_should_be_possible_to_get_it_only_in_that_level
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
@Test
public void it_should_be_possible_to_get_it_only_in_that_level() {
this.sut.add(MessageFixturer.EXAMPLE_LEVEL, MessageFixturer.EXAMPLE_TEXT);
for (final Level level : Level.values()) {
final ListAssert<Message> assertion = assertThat(this.sut.getMessages(level));
if (level == MessageFixturer.EXAMPLE_LEVEL) {
assertion.containsExactly(MESSAGE_DEFAULT_EXAMPLE);
} else {
assertion.doesNotContain(MESSAGE_DEFAULT_EXAMPLE);
}
}
}
示例3: exclusions
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
public ListAssert<Exclusion> exclusions() {
isNotNull();
return Assertions.assertThat(actual.getExclusions());
}
示例4: resultOf
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
public static <$Element> ListAssert<$Element> resultOf(CheckedListSupplier<$Element> whenStep) {
return assertThat(result(whenStep));
}
示例5: entries
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
public ListAssert<Entry> entries() {
return new ListAssert<>(actual.getEntries());
}
示例6: assertThatFileList
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
private ListAssert<String> assertThatFileList(Path path) throws IOException {
return (ListAssert) assertThat(Files.list(path))
.extracting(Path::getFileName)
.extracting(Object::toString);
}
示例7: getAnnotations
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
public ListAssert<Annotation> getAnnotations(Class<? extends Annotation> annotationClass) {
ListAssert<Annotation> assertThat = assertThat(getAnnotationList(annotationClass));
return assertThat;
}
示例8: invoke_api_method
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
@Override
protected ListAssert<String> invoke_api_method() {
return assertions.isSortedAccordingTo(comparator);
}
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:5,代码来源:ListAssert_isSortedAccordingToComparator_Test.java
示例9: invoke_api_method
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
@Override
protected ListAssert<String> invoke_api_method() {
return assertions.usingComparator(comparator);
}
示例10: invoke_api_method
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
@Override
protected ListAssert<String> invoke_api_method() {
return assertions.usingDefaultComparator();
}
示例11: invoke_api_method
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
@Override
protected ListAssert<String> invoke_api_method() {
return assertions.has(condition, index);
}
示例12: invoke_api_method
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
@Override
protected ListAssert<String> invoke_api_method() {
return assertions.contains("Yoda", index);
}
示例13: invoke_api_method
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
@Override
protected ListAssert<String> invoke_api_method() {
return assertions.usingElementComparatorIgnoringFields("field");
}
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:5,代码来源:ListAssert_usingElementComparatorIgnoringFields_Test.java
示例14: invoke_api_method
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
@Override
protected ListAssert<String> invoke_api_method() {
return assertions.doesNotContain("Yoda", index);
}
示例15: invoke_api_method
import org.assertj.core.api.ListAssert; //导入依赖的package包/类
@Override
protected ListAssert<String> invoke_api_method() {
return assertions.usingElementComparatorOnFields("field");
}
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:5,代码来源:ListAssert_usingElementComparatorOnFields_Test.java