@Test public void testFromSet() throws IOException { Collection<File> inputFiles = getTestFiles(inputPaths); FileSignature signature = FileSignature.signAsSet(inputFiles); Collection<File> expectedFiles = getTestFiles(expectedPathSet); Collection<File> outputFiles = signature.files(); assertThat(outputFiles).containsExactlyElementsOf(expectedFiles); }
@Test public void testFromList() throws IOException { Collection<File> inputFiles = getTestFiles(inputPaths); FileSignature signature = FileSignature.signAsList(inputFiles); Collection<File> expectedFiles = getTestFiles(expectedPathList); Collection<File> outputFiles = signature.files(); assertThat(outputFiles).containsExactlyElementsOf(expectedFiles); }
streams.store(storeName, QueryableStoreTypes.keyValueStore()); KeyValueIterator<String, String> keyValueIterator = readOnlyKeyValueStore.all(); assertThat(keyValueIterator).containsExactlyElementsOf(expectedResultsForJoinStateStore);
@Test public void saveOrUpdateAll() { List<Root> roots = rootsAB(); assertThat(H.saveOrUpdateAll(roots)).containsExactlyElementsOf(roots); int count = createRootRequest().count(); assertThat(count).isEqualTo(2); }
@Test public void saveAll() { List<Root> roots = rootsAB(); assertThat(H.saveAll(roots)).containsExactlyElementsOf(roots); int count = createRootRequest().count(); assertThat(count).isEqualTo(2); }
@Test public void test() throws Exception { String filename = "metrics/executable_lines.php"; PhpFile file = FileTestUtils.getFile(new File("src/test/resources/"+filename)); Set<Integer> executableLines = new ExecutableLineVisitor(parse(filename)).getExecutableLines(); assertThat(executableLines).containsExactlyElementsOf(expectedExecutableLines(file)); }
expectedStack.push(parentSpan); expectedStack.push(newSpan); assertThat(Tracer.getInstance().getCurrentSpanStackCopy()).containsExactlyElementsOf(expectedStack); assertThat(newSpan.getTraceId()).isEqualTo(parentSpan.getTraceId()); assertThat(newSpan.getParentSpanId()).isEqualTo(parentSpan.getSpanId());
protected final void assertSelection(Selection selection, String expectedSql, Collection<String> expectedParams) { String actualSql = selection.sql(); final Collection<String> actualParams = selection.params(); assertThat(actualSql).isEqualToIgnoringCase(expectedSql); assertThat(actualParams).containsExactlyElementsOf(expectedParams); }
expectedStack.push(parentSpan); expectedStack.push(newSpan); assertThat(Tracer.getInstance().getCurrentSpanStackCopy()).containsExactlyElementsOf(expectedStack); assertThat(newSpan.getTraceId()).isEqualTo(parentSpan.getTraceId()); assertThat(newSpan.getParentSpanId()).isEqualTo(parentSpan.getSpanId());