File tree Expand file tree Collapse file tree 2 files changed +72
-3
lines changed
java/org/utplsql/maven/plugin
resources/unit-tests/include_object Expand file tree Collapse file tree 2 files changed +72
-3
lines changed Original file line number Diff line number Diff line change @@ -322,11 +322,11 @@ public void db_config_using_system_properties() throws Exception {
322
322
}
323
323
324
324
/**
325
- * DB configuration from System Properties
325
+ * Exclude a list of objects
326
326
* <p>
327
- * Given : a pom.xml without dbUrl, dbUser and dbPass configured
327
+ * Given : a pom.xml with a list of objects to exclude
328
328
* When : pom is read
329
- * Then : System Properties must be used to configure database
329
+ * Then : Objects are excluded
330
330
*/
331
331
@ Test
332
332
public void exclude_object () throws Exception {
@@ -338,6 +338,23 @@ public void exclude_object() throws Exception {
338
338
assertEquals ("app.pkg_test_me,app.test_pkg_test_me" , utPlsqlMojo .excludeObject );
339
339
}
340
340
341
+ /**
342
+ * Include a list of objects
343
+ * <p>
344
+ * Given : a pom.xml with a list of objects to include
345
+ * When : pom is read
346
+ * Then : Objects are included
347
+ */
348
+ @ Test
349
+ public void include_object () throws Exception {
350
+ UtPlsqlMojo utPlsqlMojo = createUtPlsqlMojo ("include_object" );
351
+ assertNotNull (utPlsqlMojo );
352
+
353
+ utPlsqlMojo .execute ();
354
+
355
+ assertEquals ("app.pkg_test_me,app.test_pkg_test_me" , utPlsqlMojo .includeObject );
356
+ }
357
+
341
358
private UtPlsqlMojo createUtPlsqlMojo (String directory ) throws Exception {
342
359
return (UtPlsqlMojo ) rule .lookupConfiguredMojo (new File ("src/test/resources/unit-tests/" + directory ), "test" );
343
360
}
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
+ <reporters >
33
+ <reporter >
34
+ <name >UT_DOCUMENTATION_REPORTER</name >
35
+ </reporter >
36
+ <reporter >
37
+ <name >UT_COVERAGE_SONAR_REPORTER</name >
38
+ <fileOutput >coverage-sonar-report.xml</fileOutput >
39
+ <consoleOutput >false</consoleOutput >
40
+ </reporter >
41
+ <reporter >
42
+ <name >UT_SONAR_TEST_REPORTER</name >
43
+ <fileOutput >utplsql/sonar-test-report.xml</fileOutput >
44
+ <consoleOutput >true</consoleOutput >
45
+ </reporter >
46
+ </reporters >
47
+ <includeObject >app.pkg_test_me,app.test_pkg_test_me</includeObject >
48
+ </configuration >
49
+ </plugin >
50
+ </plugins >
51
+ </build >
52
+ </project >
You can’t perform that action at this time.
0 commit comments