use of org.apache.beam.examples.cookbook.CombinePerKeyExamples.FormatShakespeareOutputFn in project beam by apache.
the class CombinePerKeyExamplesTest method testFormatShakespeareOutputFn.
@Test
public void testFormatShakespeareOutputFn() throws Exception {
DoFnTester<KV<String, String>, TableRow> formatShakespeareOutputFn = DoFnTester.of(new FormatShakespeareOutputFn());
List<TableRow> results = formatShakespeareOutputFn.processBundle(COMBINED_TUPLES_ARRAY);
Assert.assertThat(results, CoreMatchers.hasItem(resultRow1));
Assert.assertThat(results, CoreMatchers.hasItem(resultRow2));
}
Aggregations