本文整理了Java中org.assertj.core.api.ObjectArrayAssert.doesNotContainNull()
方法的一些代码示例,展示了ObjectArrayAssert.doesNotContainNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectArrayAssert.doesNotContainNull()
方法的具体详情如下:
包路径:org.assertj.core.api.ObjectArrayAssert
类名称:ObjectArrayAssert
方法名:doesNotContainNull
暂无
代码示例来源:origin: PegaSysEng/pantheon
@Override
public void verify(final Node node) {
final String[] response = node.execute(transaction);
assertThat(response).hasSize(3);
assertThat(response).doesNotContainNull();
}
}
代码示例来源:origin: org.camunda.bpm.incubation/camunda-bpm-assert
private ProcessInstanceAssert isWaitingAt(final String[] activityIds, boolean exactly) {
ProcessInstance current = getExistingCurrent();
Assertions.assertThat(activityIds)
.overridingErrorMessage("Expecting list of activityIds not to be null, not to be empty and not to contain null values: %s."
, Lists.newArrayList(activityIds))
.isNotNull().isNotEmpty().doesNotContainNull();
final List<String> activeActivityIds = runtimeService().getActiveActivityIds(actual.getId());
ListAssert<String> assertion = Assertions.assertThat(activeActivityIds)
.overridingErrorMessage("Expecting %s to be waiting at '%s' but it is actually waiting at %s",
toString(current),
Lists.newArrayList(activityIds),
activeActivityIds);
if (exactly) {
String[] sorted = activityIds.clone();
Arrays.sort(sorted);
assertion.containsExactly(sorted);
} else {
assertion.contains(activityIds);
}
return this;
}
代码示例来源:origin: org.camunda.bpm.incubation/camunda-bpm-assert
/**
* Verifies the expectation that the {@link ProcessInstance} has passed one or
* more specified activities.
*
* @param activityIds the id's of the activities expected to have been passed
* @return this {@link ProcessInstanceAssert}
*/
public ProcessInstanceAssert hasPassed(final String... activityIds) {
isNotNull();
Assertions.assertThat(activityIds)
.overridingErrorMessage("Expecting list of activityIds not to be null, not to be empty and not to contain null values: %s."
, Lists.newArrayList(activityIds))
.isNotNull().isNotEmpty().doesNotContainNull();
List<HistoricActivityInstance> finishedInstances = historicActivityInstanceQuery().finished().orderByActivityId().asc().list();
List<String> finished = new ArrayList<String>(finishedInstances.size());
for (HistoricActivityInstance instance: finishedInstances) {
finished.add(instance.getActivityId());
}
final String message = "Expecting %s to have passed activities %s at least once, but actually " +
"we instead we found that it passed %s. (Please make sure you have set the history service of the engine to at least " +
"'activity' or a higher level before making use of this assertion!)";
ListAssert<String> assertion = Assertions.assertThat(finished)
.overridingErrorMessage(message,
actual,
Lists.newArrayList(activityIds),
Lists.newArrayList(finished)
);
assertion.contains(activityIds);
return this;
}
内容来源于网络,如有侵权,请联系作者删除!