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

Commita2fbce8

Browse files
committed
New reporters
1 parent236a95a commita2fbce8

File tree

9 files changed

+124
-9
lines changed

9 files changed

+124
-9
lines changed

‎src/main/java/io/github/utplsql/api/CustomTypes.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ public final class CustomTypes {
99
publicstaticfinalStringUT_REPORTERS ="UT_REPORTERS";
1010
publicstaticfinalStringUT_DOCUMENTATION_REPORTER ="UT_DOCUMENTATION_REPORTER";
1111
publicstaticfinalStringUT_COVERAGE_HTML_REPORTER ="UT_COVERAGE_HTML_REPORTER";
12+
publicstaticfinalStringUT_TEAMCITY_REPORTER ="UT_TEAMCITY_REPORTER";
13+
publicstaticfinalStringUT_XUNIT_REPORTER ="UT_XUNIT_REPORTER";
14+
publicstaticfinalStringUT_COVERALLS_REPORTER ="UT_COVERALLS_REPORTER";
15+
publicstaticfinalStringUT_COVERAGE_SONAR_REPORTER ="UT_COVERAGE_SONAR_REPORTER";
16+
publicstaticfinalStringUT_SONAR_TEST_REPORTER ="UT_SONAR_TEST_REPORTER";
1217
publicstaticfinalStringUT_VARCHAR2_LIST ="UT_VARCHAR2_LIST";
1318

1419
privateCustomTypes() {}

‎src/main/java/io/github/utplsql/api/reporter/CoverageHTMLReporter.java

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,56 @@
33
importio.github.utplsql.api.CustomTypes;
44

55
importjava.sql.SQLException;
6+
importjava.sql.SQLInput;
7+
importjava.sql.SQLOutput;
68

7-
/**
8-
* Created by Vinicius on 13/04/2017.
9-
*/
109
publicclassCoverageHTMLReporterextendsReporter {
1110

11+
privateStringprojectName;
12+
privateStringassetsPath;
13+
14+
publicCoverageHTMLReporter() {
15+
16+
}
17+
18+
publicCoverageHTMLReporter(StringprojectName,StringassetsPath) {
19+
this.projectName =projectName;
20+
this.assetsPath =assetsPath;
21+
}
22+
1223
@Override
1324
publicStringgetSQLTypeName()throwsSQLException {
1425
returnCustomTypes.UT_COVERAGE_HTML_REPORTER;
1526
}
1627

28+
publicStringgetProjectName() {
29+
returnprojectName;
30+
}
31+
32+
publicvoidsetProjectName(StringprojectName) {
33+
this.projectName =projectName;
34+
}
35+
36+
publicStringgetAssetsPath() {
37+
returnassetsPath;
38+
}
39+
40+
publicvoidsetAssetsPath(StringassetsPath) {
41+
this.assetsPath =assetsPath;
42+
}
43+
44+
@Override
45+
publicvoidreadSQL(SQLInputstream,StringtypeName)throwsSQLException {
46+
super.readSQL(stream,typeName);
47+
setProjectName(stream.readString());
48+
setAssetsPath(stream.readString());
49+
}
50+
51+
@Override
52+
publicvoidwriteSQL(SQLOutputstream)throwsSQLException {
53+
super.writeSQL(stream);
54+
stream.writeString(getProjectName());
55+
stream.writeString(getAssetsPath());
56+
}
57+
1758
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
packageio.github.utplsql.api.reporter;
2+
3+
importio.github.utplsql.api.CustomTypes;
4+
5+
importjava.sql.SQLException;
6+
7+
publicclassCoverageSonarReporterextendsReporter {
8+
9+
@Override
10+
publicStringgetSQLTypeName()throwsSQLException {
11+
returnCustomTypes.UT_COVERAGE_SONAR_REPORTER;
12+
}
13+
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
packageio.github.utplsql.api.reporter;
2+
3+
importio.github.utplsql.api.CustomTypes;
4+
5+
importjava.sql.SQLException;
6+
7+
publicclassCoverallsReporterextendsReporter {
8+
9+
@Override
10+
publicStringgetSQLTypeName()throwsSQLException {
11+
returnCustomTypes.UT_COVERALLS_REPORTER;
12+
}
13+
14+
}

‎src/main/java/io/github/utplsql/api/reporter/DocumentationReporter.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
importjava.sql.SQLException;
66

7-
/**
8-
* Created by Vinicius on 13/04/2017.
9-
*/
107
publicclassDocumentationReporterextendsReporter {
118

129
@Override

‎src/main/java/io/github/utplsql/api/reporter/ReporterFactory.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
importio.github.utplsql.api.CustomTypes;
44

5-
/**
6-
* Created by vinicius.moreira on 22/05/2017.
7-
*/
85
publicfinalclassReporterFactory {
96

107
privateReporterFactory() {}
@@ -13,6 +10,11 @@ public static Reporter createReporter(String reporterName) {
1310
switch (reporterName.toUpperCase()) {
1411
caseCustomTypes.UT_DOCUMENTATION_REPORTER:returnnewDocumentationReporter();
1512
caseCustomTypes.UT_COVERAGE_HTML_REPORTER:returnnewCoverageHTMLReporter();
13+
caseCustomTypes.UT_TEAMCITY_REPORTER:returnnewTeamCityReporter();
14+
caseCustomTypes.UT_XUNIT_REPORTER:returnnewXUnitReporter();
15+
caseCustomTypes.UT_COVERALLS_REPORTER:returnnewCoverallsReporter();
16+
caseCustomTypes.UT_COVERAGE_SONAR_REPORTER:returnnewCoverageSonarReporter();
17+
caseCustomTypes.UT_SONAR_TEST_REPORTER:returnnewSonarTestReporter();
1618
}
1719
thrownewRuntimeException("Reporter " +reporterName +" not implemented.");
1820
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
packageio.github.utplsql.api.reporter;
2+
3+
importio.github.utplsql.api.CustomTypes;
4+
5+
importjava.sql.SQLException;
6+
7+
publicclassSonarTestReporterextendsReporter {
8+
9+
@Override
10+
publicStringgetSQLTypeName()throwsSQLException {
11+
returnCustomTypes.UT_SONAR_TEST_REPORTER;
12+
}
13+
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
packageio.github.utplsql.api.reporter;
2+
3+
importio.github.utplsql.api.CustomTypes;
4+
5+
importjava.sql.SQLException;
6+
7+
publicclassTeamCityReporterextendsReporter {
8+
9+
@Override
10+
publicStringgetSQLTypeName()throwsSQLException {
11+
returnCustomTypes.UT_TEAMCITY_REPORTER;
12+
}
13+
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
packageio.github.utplsql.api.reporter;
2+
3+
importio.github.utplsql.api.CustomTypes;
4+
5+
importjava.sql.SQLException;
6+
7+
publicclassXUnitReporterextendsReporter {
8+
9+
@Override
10+
publicStringgetSQLTypeName()throwsSQLException {
11+
returnCustomTypes.UT_XUNIT_REPORTER;
12+
}
13+
14+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp