Added log/verbose command line options and related tests
This commit is contained in:
parent
1bb359dcc6
commit
a84a6fe9e2
4 changed files with 122 additions and 27 deletions
|
@ -96,6 +96,13 @@ class TestNgOperationTest {
|
|||
.suites("src/test/resources/testng2.xml")
|
||||
.execute())
|
||||
.doesNotThrowAnyException();
|
||||
|
||||
assertThatCode(() ->
|
||||
new TestNgOperation().fromProject(new Project())
|
||||
.suites("src/test/resources/testng3.xml")
|
||||
.log(2)
|
||||
.execute())
|
||||
.doesNotThrowAnyException();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -302,6 +309,15 @@ class TestNgOperationTest {
|
|||
assertThat(op.options.get("-usedefaultlisteners")).isEqualTo("true");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testVerbose() {
|
||||
var op = new TestNgOperation().log(1);
|
||||
assertThat(op.options.get("-log")).isEqualTo("1");
|
||||
|
||||
op = new TestNgOperation().verbose(1);
|
||||
assertThat(op.options.get("-verbose")).isEqualTo("1");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testXmlPathInJar() {
|
||||
var op = new TestNgOperation().xmlPathInJar(FOO);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue