Search in sources :

Example 1 with ExtractCountryInfoFn

use of org.apache.beam.examples.cookbook.JoinExamples.ExtractCountryInfoFn in project beam by apache.

the class JoinExamplesTest method testExtractCountryInfoFn.

@Test
public void testExtractCountryInfoFn() throws Exception {
    DoFnTester<TableRow, KV<String, String>> extractCountryInfoFn = DoFnTester.of(new ExtractCountryInfoFn());
    List<KV<String, String>> results = extractCountryInfoFn.processBundle(CCS);
    Assert.assertThat(results, CoreMatchers.hasItem(kv3));
    Assert.assertThat(results, CoreMatchers.hasItem(kv4));
}
Also used : ExtractCountryInfoFn(org.apache.beam.examples.cookbook.JoinExamples.ExtractCountryInfoFn) TableRow(com.google.api.services.bigquery.model.TableRow) KV(org.apache.beam.sdk.values.KV) Test(org.junit.Test)

Aggregations

TableRow (com.google.api.services.bigquery.model.TableRow)1 ExtractCountryInfoFn (org.apache.beam.examples.cookbook.JoinExamples.ExtractCountryInfoFn)1 KV (org.apache.beam.sdk.values.KV)1 Test (org.junit.Test)1