Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c858c31

Browse filesBrowse files
committed
add include and exclude test
1 parent eda0d5b commit c858c31
Copy full SHA for c858c31

File tree

Expand file treeCollapse file tree

2 files changed

+55
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+55
-0
lines changed

‎src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java

Copy file name to clipboardExpand all lines: src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,24 @@ public void db_config_using_system_properties() throws Exception {
303303
System.setProperty("dbUrl", "");
304304
System.setProperty("dbUser", "");
305305
System.setProperty("dbPass", "");
306+
}
307+
308+
/**
309+
* DB configuration from System Properties
310+
* <p>
311+
* Given : a pom.xml without dbUrl, dbUser and dbPass configured
312+
* When : pom is read
313+
* Then : System Properties must be used to configure database
314+
*/
315+
@Test
316+
public void include_and_exclude_objects() throws Exception {
317+
UtPlsqlMojo utPlsqlMojo = createUtPlsqlMojo("include_and_exclude_objects");
318+
assertNotNull(utPlsqlMojo);
319+
320+
utPlsqlMojo.execute();
306321

322+
assertEquals("abc", utPlsqlMojo.includeObject);
323+
assertEquals("xyz", utPlsqlMojo.excludeObject);
307324
}
308325

309326
private UtPlsqlMojo createUtPlsqlMojo(String directory) throws Exception {
+38Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>org.utplsql</groupId>
7+
<artifactId>utplsql-maven-plugin-test</artifactId>
8+
<version>3.1.0-SNAPSHOT</version>
9+
<packaging>pom</packaging>
10+
11+
<properties>
12+
<dbUrl>jdbc:oracle:thin:@127.0.0.1:1521:xe</dbUrl>
13+
<dbUser>UT3</dbUser>
14+
<dbPass>UT3</dbPass>
15+
</properties>
16+
17+
<build>
18+
<directory>../../../target</directory>
19+
<plugins>
20+
<plugin>
21+
<groupId>org.utplsql</groupId>
22+
<artifactId>utplsql-maven-plugin</artifactId>
23+
<version>@proj</version>
24+
<goals>
25+
<goal>test</goal>
26+
</goals>
27+
<configuration>
28+
<ignoreFailure>false</ignoreFailure>
29+
<paths>
30+
<path>app</path>
31+
</paths>
32+
<includeObject>abc</includeObject>
33+
<excludeObject>xyz</excludeObject>
34+
</configuration>
35+
</plugin>
36+
</plugins>
37+
</build>
38+
</project>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.