protected void appendCommand(Path results, Document command) throws IOException { assertThat(command).isNotNull(); assertThat(Files.exists(results)).isTrue(); Array arrayOfDocuments = readResults(results.toFile()); arrayOfDocuments.add(command); try (OutputStream stream = new FileOutputStream(results.toFile())) { ArrayWriter.prettyWriter().write(arrayOfDocuments, stream); } if (Testing.Debug.isEnabled()) { String content = IoUtil.read(results.toFile()); Testing.debug("expected results file '" + results + "' after appending command:"); Testing.debug(content); } }
recordConsumer.accept(record); if (Testing.Debug.isEnabled()) { Testing.debug("Consumed record " + recordsConsumed + " / " + numberOfRecords + " (" + (numberOfRecords - recordsConsumed) + " more)");
protected void assertExpectedRecords(Path path, int batchCount, int recordsPerBatch) throws IOException { assertThat(Files.exists(path)).isTrue(); if (Testing.Debug.isEnabled()) { String content = IoUtil.read(path.toFile()); Testing.debug("expected results file '" + path + "':");
protected void assertExpectedRecords(Path path, int batchCount, int recordsPerBatch) throws IOException { assertThat(Files.exists(path)).isTrue(); if (Testing.Debug.isEnabled()) { String content = IoUtil.read(path.toFile()); Testing.debug("expected results file '" + path + "':");
recordConsumer.accept(record); if (Testing.Debug.isEnabled()) { Testing.debug("Consumed record " + recordsConsumed + " / " + numberOfRecords + " (" + (numberOfRecords - recordsConsumed) + " more)");
protected void appendCommand(Path results, Document command) throws IOException { assertThat(command).isNotNull(); assertThat(Files.exists(results)).isTrue(); Array arrayOfDocuments = readResults(results.toFile()); arrayOfDocuments.add(command); try (OutputStream stream = new FileOutputStream(results.toFile())) { ArrayWriter.prettyWriter().write(arrayOfDocuments, stream); } if (Testing.Debug.isEnabled()) { String content = IoUtil.read(results.toFile()); Testing.debug("expected results file '" + results + "' after appending command:"); Testing.debug(content); } }