Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
New reporters
  • Loading branch information
viniciusam committed May 22, 2017
commit a2fbce8ebee46af39387493a3feb0b45bccc8664
5 changes: 5 additions & 0 deletions src/main/java/io/github/utplsql/api/CustomTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ public final class CustomTypes {
public static final String UT_REPORTERS = "UT_REPORTERS";
public static final String UT_DOCUMENTATION_REPORTER = "UT_DOCUMENTATION_REPORTER";
public static final String UT_COVERAGE_HTML_REPORTER = "UT_COVERAGE_HTML_REPORTER";
public static final String UT_TEAMCITY_REPORTER = "UT_TEAMCITY_REPORTER";
public static final String UT_XUNIT_REPORTER = "UT_XUNIT_REPORTER";
public static final String UT_COVERALLS_REPORTER = "UT_COVERALLS_REPORTER";
public static final String UT_COVERAGE_SONAR_REPORTER = "UT_COVERAGE_SONAR_REPORTER";
public static final String UT_SONAR_TEST_REPORTER = "UT_SONAR_TEST_REPORTER";
public static final String UT_VARCHAR2_LIST = "UT_VARCHAR2_LIST";

private CustomTypes() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,56 @@
import io.github.utplsql.api.CustomTypes;

import java.sql.SQLException;
import java.sql.SQLInput;
import java.sql.SQLOutput;

/**
* Created by Vinicius on 13/04/2017.
*/
public class CoverageHTMLReporter extends Reporter {

private String projectName;
private String assetsPath;

public CoverageHTMLReporter() {

}

public CoverageHTMLReporter(String projectName, String assetsPath) {
this.projectName = projectName;
this.assetsPath = assetsPath;
}

@Override
public String getSQLTypeName() throws SQLException {
return CustomTypes.UT_COVERAGE_HTML_REPORTER;
}

public String getProjectName() {
return projectName;
}

public void setProjectName(String projectName) {
this.projectName = projectName;
}

public String getAssetsPath() {
return assetsPath;
}

public void setAssetsPath(String assetsPath) {
this.assetsPath = assetsPath;
}

@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException {
super.readSQL(stream, typeName);
setProjectName(stream.readString());
setAssetsPath(stream.readString());
}

@Override
public void writeSQL(SQLOutput stream) throws SQLException {
super.writeSQL(stream);
stream.writeString(getProjectName());
stream.writeString(getAssetsPath());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.github.utplsql.api.reporter;

import io.github.utplsql.api.CustomTypes;

import java.sql.SQLException;

public class CoverageSonarReporter extends Reporter {

@Override
public String getSQLTypeName() throws SQLException {
return CustomTypes.UT_COVERAGE_SONAR_REPORTER;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.github.utplsql.api.reporter;

import io.github.utplsql.api.CustomTypes;

import java.sql.SQLException;

public class CoverallsReporter extends Reporter {

@Override
public String getSQLTypeName() throws SQLException {
return CustomTypes.UT_COVERALLS_REPORTER;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

import java.sql.SQLException;

/**
* Created by Vinicius on 13/04/2017.
*/
public class DocumentationReporter extends Reporter {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

import io.github.utplsql.api.CustomTypes;

/**
* Created by vinicius.moreira on 22/05/2017.
*/
public final class ReporterFactory {

private ReporterFactory() {}
Expand All @@ -13,6 +10,11 @@ public static Reporter createReporter(String reporterName) {
switch (reporterName.toUpperCase()) {
case CustomTypes.UT_DOCUMENTATION_REPORTER: return new DocumentationReporter();
case CustomTypes.UT_COVERAGE_HTML_REPORTER: return new CoverageHTMLReporter();
case CustomTypes.UT_TEAMCITY_REPORTER: return new TeamCityReporter();
case CustomTypes.UT_XUNIT_REPORTER: return new XUnitReporter();
case CustomTypes.UT_COVERALLS_REPORTER: return new CoverallsReporter();
case CustomTypes.UT_COVERAGE_SONAR_REPORTER: return new CoverageSonarReporter();
case CustomTypes.UT_SONAR_TEST_REPORTER: return new SonarTestReporter();
}
throw new RuntimeException("Reporter " + reporterName + " not implemented.");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.github.utplsql.api.reporter;

import io.github.utplsql.api.CustomTypes;

import java.sql.SQLException;

public class SonarTestReporter extends Reporter {

@Override
public String getSQLTypeName() throws SQLException {
return CustomTypes.UT_SONAR_TEST_REPORTER;
}

}
14 changes: 14 additions & 0 deletions src/main/java/io/github/utplsql/api/reporter/TeamCityReporter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.github.utplsql.api.reporter;

import io.github.utplsql.api.CustomTypes;

import java.sql.SQLException;

public class TeamCityReporter extends Reporter {

@Override
public String getSQLTypeName() throws SQLException {
return CustomTypes.UT_TEAMCITY_REPORTER;
}

}
14 changes: 14 additions & 0 deletions src/main/java/io/github/utplsql/api/reporter/XUnitReporter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.github.utplsql.api.reporter;

import io.github.utplsql.api.CustomTypes;

import java.sql.SQLException;

public class XUnitReporter extends Reporter {

@Override
public String getSQLTypeName() throws SQLException {
return CustomTypes.UT_XUNIT_REPORTER;
}

}