Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
First failing test for new parameter
  • Loading branch information
pesse committed Apr 4, 2019
commit 02aa1217d991247b9aeeabadfaeca11f3c18780d
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.1</version>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/utplsql/cli/RunCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public int run() {
return Cli.DEFAULT_ERROR_CODE;
}

private TestRunner newTestRunner( List<Reporter> reporterList) {
TestRunner newTestRunner( List<Reporter> reporterList) {

final File baseDir = new File("").getAbsoluteFile();

Expand Down
13 changes: 13 additions & 0 deletions src/test/java/org/utplsql/cli/RunCommandTest.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package org.utplsql.cli;

import org.junit.jupiter.api.Test;
import org.utplsql.api.TestRunnerOptions;
import org.utplsql.api.reporter.CoreReporters;

import java.util.ArrayList;
import java.util.List;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.*;

/**
Expand Down Expand Up @@ -92,4 +96,13 @@ void connectionString_asSysdba() {
assertEquals("sys as sysdba/mypass@connectstring/service",
runCmd.getConnectionInfo().getConnectionString());
}

@Test
void randomOrder_withoutSeed() {
RunCommand runCmd = TestHelper.createRunCommand(TestHelper.getConnectionString(),
"-random");

TestRunnerOptions options = runCmd.newTestRunner(new ArrayList<>()).getOptions();
assertThat(options.randomTestOrder, equalTo(true));
}
}