-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathRunCommandConfigParamsArePassedToTestRunnerTest.java
More file actions
42 lines (35 loc) · 1.53 KB
/
RunCommandConfigParamsArePassedToTestRunnerTest.java
File metadata and controls
42 lines (35 loc) · 1.53 KB
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
33
34
35
36
37
38
39
40
41
42
package org.utplsql.cli;
import org.junit.jupiter.api.Test;
import org.utplsql.api.TestRunner;
import org.utplsql.cli.config.RunCommandConfig;
import java.util.ArrayList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class RunCommandConfigParamsArePassedToTestRunnerTest {
@Test
void tags() {
RunCommandConfig config = new RunCommandConfig.Builder()
.tags(new String[]{"tag1", "tag2"})
.create();
TestRunner testRunner = new RunAction(config).newTestRunner(new ArrayList<>());
assertThat( testRunner.getOptions().tags, contains("tag1", "tag2") );
}
@Test
void coverageSchemes() {
RunCommandConfig config = new RunCommandConfig.Builder()
.coverageSchemes(new String[]{"schema1", "another_schema", "and-another-one"})
.create();
TestRunner testRunner = new RunAction(config).newTestRunner(new ArrayList<>());
assertThat( testRunner.getOptions().coverageSchemes, contains("schema1", "another_schema", "and-another-one") );
}
@Test
void oraStuckTimeout() {
RunCommandConfig config = new RunCommandConfig.Builder()
.oraStuckTimeout(2)
.create();
TestRunner testRunner = new RunAction(config).newTestRunner(new ArrayList<>());
assertThat( testRunner.getOptions().oraStuckTimeout, equalTo(2) );
}
}