1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package dev.aherscu.qa.testing.example.scenarios;
18
19 import static dev.aherscu.qa.jgiven.commons.utils.ConfigurableScenarioTest.*;
20 import static dev.aherscu.qa.testing.utils.StreamMatchers.*;
21 import static org.hamcrest.MatcherAssert.*;
22 import static org.hamcrest.Matchers.*;
23
24 import java.util.stream.*;
25
26 import org.testng.annotations.*;
27
28 import lombok.extern.slf4j.*;
29
30 @Slf4j
31 public class SelfTests extends AbstractSelfTests {
32
33
34 @Test
35 public void shouldMatchEitherString() {
36 assertThat(
37 Stream.of("adf testng", "testng fadf", "Try again", "More results",
38 "gwrr testngrggr"),
39 allMatch(either(containsStringIgnoringCase("testng"))
40 .or(containsStringIgnoringCase("More results"))
41 .or(containsStringIgnoringCase("Try again"))));
42 }
43
44 @Test(dataProvider = INTERNAL_DATA_PROVIDER)
45 public void shouldRun(final int id) {
46 log.debug("runs with {}", id);
47 }
48
49 @DataProvider
50 private Object[][] data() {
51 return new Object[][] { { 1 }, { 2 } };
52 }
53
54 }