本文整理了Java中org.assertj.core.api.ListAssert.containsExactlyInAnyOrderElementsOf()
方法的一些代码示例,展示了ListAssert.containsExactlyInAnyOrderElementsOf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListAssert.containsExactlyInAnyOrderElementsOf()
方法的具体详情如下:
包路径:org.assertj.core.api.ListAssert
类名称:ListAssert
方法名:containsExactlyInAnyOrderElementsOf
暂无
代码示例来源:origin: cbeust/testng
@Test
public void ensureTestClassInstantiationWorksWhenFactoryMethodAndCustomConstructorPresent() {
TestNG testng = create(TestclassSample.class);
testng.setVerbose(2);
testng.run();
List<String> expected = Arrays.asList("1", "2");
assertThat(TestclassSample.logs).containsExactlyInAnyOrderElementsOf(expected);
}
代码示例来源:origin: cbeust/testng
@Test
public void testFactoryAnnotatedConstructor() {
TestNG testng = create(FactoryAnnotatedConstructorExample.class);
ResultExtractor extractor = new ResultExtractor();
testng.addListener(extractor);
testng.setVerbose(4);
testng.run();
List<Object[]> expected = Lists.newArrayList();
expected.add(new Object[]{1});
expected.add(new Object[]{2});
List<Object[]> actual = FactoryAnnotatedConstructorExample.objects.stream()
.map(extractor::getData)
.collect(Collectors.toList());
assertThat(actual).containsExactlyInAnyOrderElementsOf(expected);
}
代码示例来源:origin: reactor/reactor-core
assertThat(disordered).containsExactlyInAnyOrderElementsOf(ordered);
代码示例来源:origin: palantir/atlasdb
private void requestResiduesAndAssertEachUsedOnce(int times) {
List<Integer> responses = requestResidues(times);
assertThat(responses).containsExactlyInAnyOrderElementsOf(
IntStream.range(0, times).boxed().collect(Collectors.toList()));
}
代码示例来源:origin: PegaSysEng/pantheon
@Override
protected void assertResultMatchesExpectation(
final List<BytesValue> requestedData,
final PeerTaskResult<List<BytesValue>> response,
final EthPeer respondingPeer) {
assertThat(response.getResult()).containsExactlyInAnyOrderElementsOf(requestedData);
assertThat(response.getPeer()).isEqualTo(respondingPeer);
}
}
代码示例来源:origin: webanno/webanno
@Test
public void thatExportingWorks() throws Exception
{
// Export the project and import it again
ArgumentCaptor<AnnotationLayer> captor = runExportImportAndFetchEvents();
// Check that after re-importing the exported projects, they are identical to the original
assertThat(captor.getAllValues())
.usingElementComparatorIgnoringFields("id")
.containsExactlyInAnyOrderElementsOf(layers());
}
代码示例来源:origin: PegaSysEng/pantheon
.collect(toList());
assertThat(senderIds).containsExactlyInAnyOrderElementsOf(agentIds);
代码示例来源:origin: SpectoLabs/hoverfly-java
@Test
public void shouldCombineAndImportMultipleSimulationSources() throws Exception {
startDefaultHoverfly();
// When
Simulation simulation1 = mapper.readValue(Resources.getResource("test-service.json"), Simulation.class);
Simulation simulation2 = mapper.readValue(Resources.getResource("test-service-https.json"), Simulation.class);
hoverfly.simulate(classpath("test-service.json"), classpath("test-service-https.json"));
// Then
Simulation exportedSimulation = hoverfly.getSimulation();
Sets.SetView<RequestResponsePair> expectedData = Sets.union(simulation1.getHoverflyData().getPairs(), simulation2.getHoverflyData().getPairs());
List<DelaySettings> expectedDelaySettings = new ArrayList<>();
expectedDelaySettings.addAll(simulation1.getHoverflyData().getGlobalActions().getDelays());
expectedDelaySettings.addAll(simulation2.getHoverflyData().getGlobalActions().getDelays());
assertThat(exportedSimulation.getHoverflyData().getPairs()).containsExactlyInAnyOrderElementsOf(expectedData);
assertThat(exportedSimulation.getHoverflyData().getGlobalActions().getDelays()).containsExactlyInAnyOrderElementsOf(expectedDelaySettings);
}
内容来源于网络,如有侵权,请联系作者删除!