Skip to content

Commit a2fbce8

Browse files
committed
New reporters
1 parent 236a95a commit a2fbce8

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
public static final String UT_REPORTERS = "UT_REPORTERS";
1010
public static final String UT_DOCUMENTATION_REPORTER = "UT_DOCUMENTATION_REPORTER";
1111
public static final String UT_COVERAGE_HTML_REPORTER = "UT_COVERAGE_HTML_REPORTER";
12+
public static final String UT_TEAMCITY_REPORTER = "UT_TEAMCITY_REPORTER";
13+
public static final String UT_XUNIT_REPORTER = "UT_XUNIT_REPORTER";
14+
public static final String UT_COVERALLS_REPORTER = "UT_COVERALLS_REPORTER";
15+
public static final String UT_COVERAGE_SONAR_REPORTER = "UT_COVERAGE_SONAR_REPORTER";
16+
public static final String UT_SONAR_TEST_REPORTER = "UT_SONAR_TEST_REPORTER";
1217
public static final String UT_VARCHAR2_LIST = "UT_VARCHAR2_LIST";
1318

1419
private CustomTypes() {}

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
import io.github.utplsql.api.CustomTypes;
44

55
import java.sql.SQLException;
6+
import java.sql.SQLInput;
7+
import java.sql.SQLOutput;
68

7-
/**
8-
* Created by Vinicius on 13/04/2017.
9-
*/
109
public class CoverageHTMLReporter extends Reporter {
1110

11+
private String projectName;
12+
private String assetsPath;
13+
14+
public CoverageHTMLReporter() {
15+
16+
}
17+
18+
public CoverageHTMLReporter(String projectName, String assetsPath) {
19+
this.projectName = projectName;
20+
this.assetsPath = assetsPath;
21+
}
22+
1223
@Override
1324
public String getSQLTypeName() throws SQLException {
1425
return CustomTypes.UT_COVERAGE_HTML_REPORTER;
1526
}
1627

28+
public String getProjectName() {
29+
return projectName;
30+
}
31+
32+
public void setProjectName(String projectName) {
33+
this.projectName = projectName;
34+
}
35+
36+
public String getAssetsPath() {
37+
return assetsPath;
38+
}
39+
40+
public void setAssetsPath(String assetsPath) {
41+
this.assetsPath = assetsPath;
42+
}
43+
44+
@Override
45+
public void readSQL(SQLInput stream, String typeName) throws SQLException {
46+
super.readSQL(stream, typeName);
47+
setProjectName(stream.readString());
48+
setAssetsPath(stream.readString());
49+
}
50+
51+
@Override
52+
public void writeSQL(SQLOutput stream) throws SQLException {
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+
package io.github.utplsql.api.reporter;
2+
3+
import io.github.utplsql.api.CustomTypes;
4+
5+
import java.sql.SQLException;
6+
7+
public class CoverageSonarReporter extends Reporter {
8+
9+
@Override
10+
public String getSQLTypeName() throws SQLException {
11+
return CustomTypes.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+
package io.github.utplsql.api.reporter;
2+
3+
import io.github.utplsql.api.CustomTypes;
4+
5+
import java.sql.SQLException;
6+
7+
public class CoverallsReporter extends Reporter {
8+
9+
@Override
10+
public String getSQLTypeName() throws SQLException {
11+
return CustomTypes.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
import java.sql.SQLException;
66

7-
/**
8-
* Created by Vinicius on 13/04/2017.
9-
*/
107
public class DocumentationReporter extends Reporter {
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
import io.github.utplsql.api.CustomTypes;
44

5-
/**
6-
* Created by vinicius.moreira on 22/05/2017.
7-
*/
85
public final class ReporterFactory {
96

107
private ReporterFactory() {}
@@ -13,6 +10,11 @@ public static Reporter createReporter(String reporterName) {
1310
switch (reporterName.toUpperCase()) {
1411
case CustomTypes.UT_DOCUMENTATION_REPORTER: return new DocumentationReporter();
1512
case CustomTypes.UT_COVERAGE_HTML_REPORTER: return new CoverageHTMLReporter();
13+
case CustomTypes.UT_TEAMCITY_REPORTER: return new TeamCityReporter();
14+
case CustomTypes.UT_XUNIT_REPORTER: return new XUnitReporter();
15+
case CustomTypes.UT_COVERALLS_REPORTER: return new CoverallsReporter();
16+
case CustomTypes.UT_COVERAGE_SONAR_REPORTER: return new CoverageSonarReporter();
17+
case CustomTypes.UT_SONAR_TEST_REPORTER: return new SonarTestReporter();
1618
}
1719
throw new RuntimeException("Reporter " + reporterName + " not implemented.");
1820
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package io.github.utplsql.api.reporter;
2+
3+
import io.github.utplsql.api.CustomTypes;
4+
5+
import java.sql.SQLException;
6+
7+
public class SonarTestReporter extends Reporter {
8+
9+
@Override
10+
public String getSQLTypeName() throws SQLException {
11+
return CustomTypes.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+
package io.github.utplsql.api.reporter;
2+
3+
import io.github.utplsql.api.CustomTypes;
4+
5+
import java.sql.SQLException;
6+
7+
public class TeamCityReporter extends Reporter {
8+
9+
@Override
10+
public String getSQLTypeName() throws SQLException {
11+
return CustomTypes.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+
package io.github.utplsql.api.reporter;
2+
3+
import io.github.utplsql.api.CustomTypes;
4+
5+
import java.sql.SQLException;
6+
7+
public class XUnitReporter extends Reporter {
8+
9+
@Override
10+
public String getSQLTypeName() throws SQLException {
11+
return CustomTypes.UT_XUNIT_REPORTER;
12+
}
13+
14+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy