Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit2c682e9

Browse files
committed
Added config for FileMapper
Understanding what's going on was actually the biggest challenge here.
1 parent611234d commit2c682e9

File tree

3 files changed

+89
-12
lines changed

3 files changed

+89
-12
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
packageorg.utplsql.cli.config;
2+
3+
importjava.beans.ConstructorProperties;
4+
importjava.util.HashMap;
5+
importjava.util.Map;
6+
7+
publicclassFileMapperConfig {
8+
9+
privatefinalStringpath;
10+
privatefinalStringowner;
11+
privatefinalStringregexExpression;
12+
privatefinalMap<String,String>typeMapping;
13+
privatefinalIntegerownerSubexpression;
14+
privatefinalIntegernameSubexpression;
15+
privatefinalIntegertypeSubexpression;
16+
17+
@ConstructorProperties({"path","owner","regexExpression","typeMapping","ownerSubexpression","nameSubexpression","typeSubexpression"})
18+
publicFileMapperConfig(Stringpath,Stringowner,StringregexExpression,Map<String,String>typeMapping,IntegerownerSubexpression,IntegernameSubexpression,IntegertypeSubexpression) {
19+
this.path =path;
20+
this.owner =owner;
21+
this.regexExpression =regexExpression;
22+
this.typeMapping =typeMapping;
23+
this.ownerSubexpression =ownerSubexpression;
24+
this.nameSubexpression =nameSubexpression;
25+
this.typeSubexpression =typeSubexpression;
26+
}
27+
28+
publicStringgetPath() {
29+
returnpath;
30+
}
31+
32+
publicStringgetOwner() {
33+
returnowner;
34+
}
35+
36+
publicStringgetRegexExpression() {
37+
returnregexExpression;
38+
}
39+
40+
publicMap<String,String>getTypeMapping() {
41+
returntypeMapping;
42+
}
43+
44+
publicIntegergetOwnerSubexpression() {
45+
returnownerSubexpression;
46+
}
47+
48+
publicIntegergetNameSubexpression() {
49+
returnnameSubexpression;
50+
}
51+
52+
publicIntegergetTypeSubexpression() {
53+
returntypeSubexpression;
54+
}
55+
}

‎src/main/java/org/utplsql/cli/config/TestRunnerConfig.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ public class TestRunnerConfig extends ConnectionConfig {
1212
privatebooleanskipCompatibilityCheck =false;
1313
privatefinalString[]includePackages;
1414
privatefinalString[]excludePackages;
15-
privatefinalStringsourcePath;
16-
privatefinalStringtestPath;
15+
privatefinalFileMapperConfigsourceMapping;
16+
privatefinalFileMapperConfigtestMapping;
1717

18-
@ConstructorProperties({"connectString","suitePaths","reporters","outputAnsiColor","failureExitCode","skipCompatibilityCheck","includePackages","excludePackages","sourcePath","testPath"})
19-
publicTestRunnerConfig(StringconnectString,String[]suitePaths,ReporterConfig[]reporters,booleanoutputAnsiColor,IntegerfailureExitCode,booleanskipCompatibilityCheck,String[]includePackages,String[]excludePackages,StringsourcePath,StringtestPath) {
18+
@ConstructorProperties({"connectString","suitePaths","reporters","outputAnsiColor","failureExitCode","skipCompatibilityCheck","includePackages","excludePackages","sourceMapping","testMapping"})
19+
publicTestRunnerConfig(StringconnectString,String[]suitePaths,ReporterConfig[]reporters,booleanoutputAnsiColor,IntegerfailureExitCode,booleanskipCompatibilityCheck,String[]includePackages,String[]excludePackages,FileMapperConfigsourceMapping,FileMapperConfigtestMapping) {
2020
super(connectString);
2121
this.suitePaths =suitePaths;
2222
this.reporters =reporters;
@@ -25,8 +25,8 @@ public TestRunnerConfig(String connectString, String[] suitePaths, ReporterConfi
2525
this.skipCompatibilityCheck =skipCompatibilityCheck;
2626
this.includePackages =includePackages;
2727
this.excludePackages =excludePackages;
28-
this.sourcePath =sourcePath;
29-
this.testPath =testPath;
28+
this.sourceMapping =sourceMapping;
29+
this.testMapping =testMapping;
3030
}
3131

3232
publicString[]getSuitePaths() {
@@ -57,11 +57,11 @@ public String[] getExcludePackages() {
5757
returnexcludePackages;
5858
}
5959

60-
publicStringgetSourcePath() {
61-
returnsourcePath;
60+
publicFileMapperConfiggetSourceMapping() {
61+
returnsourceMapping;
6262
}
6363

64-
publicStringgetTestPath() {
65-
returntestPath;
64+
publicFileMapperConfiggetTestMapping() {
65+
returntestMapping;
6666
}
6767
}

‎src/test/resources/test-config.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,27 @@ includePackages: [app.betwnstr, mypackage]
1818
excludePackages:
1919
-mypackage.blubb
2020
-stuff
21-
sourcePath:path/to/source
22-
testPath:path/to/test
21+
sourceMapping:
22+
path:path/to/source
23+
owner:app
24+
regexExpression:/(\w+)/(\w+)/(\w+)\..{3}$
25+
typeMapping:
26+
packages_bodies:PACKAGE BODY
27+
types_bodies:TYPE BODY
28+
triggers:TRIGGER
29+
procedures:PROCEDURE
30+
functions:FUNCTION
31+
ownerSubexpression:1
32+
nameSubexpression:3
33+
typeSubexpression:2
34+
testMapping:
35+
path:path/to/test
36+
owner:app
37+
regexExpression:/(\w+)/(\w+)/(\w+)\..{3}$
38+
typeMapping:
39+
body:PACKAGE BODY
40+
type_body:TYPE BODY
41+
trigger:TRIGGER
42+
ownerSubexpression:1
43+
nameSubexpression:3
44+
typeSubexpression:2

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp