File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed
java/org/utplsql/maven/plugin
resources/unit-tests/include_and_exclude_objects Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,24 @@ public void db_config_using_system_properties() throws Exception {
303
303
System .setProperty ("dbUrl" , "" );
304
304
System .setProperty ("dbUser" , "" );
305
305
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 ();
306
321
322
+ assertEquals ("abc" , utPlsqlMojo .includeObject );
323
+ assertEquals ("xyz" , utPlsqlMojo .excludeObject );
307
324
}
308
325
309
326
private UtPlsqlMojo createUtPlsqlMojo (String directory ) throws Exception {
Original file line number Diff line number Diff line change
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 >
You can’t perform that action at this time.
0 commit comments