-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathAppTest.java
More file actions
32 lines (27 loc) · 982 Bytes
/
AppTest.java
File metadata and controls
32 lines (27 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
package com.example;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.testing.PAssert;
import org.apache.beam.sdk.testing.TestPipeline;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class AppTest {
@Rule
public final transient TestPipeline pipeline = TestPipeline.create();
@Test
public void appRuns() {
var elements = App.buildPipeline(pipeline, "Test");
// Note that the order of the elements doesn't matter.
PAssert.that(elements).containsInAnyOrder("Test", "Hello", "World!");
pipeline.run().waitUntilFinish();
}
}