forked from utPLSQL/utPLSQL-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReporterFactoryProvider.java
More file actions
28 lines (22 loc) · 1020 Bytes
/
ReporterFactoryProvider.java
File metadata and controls
28 lines (22 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package org.utplsql.cli;
import org.utplsql.api.compatibility.CompatibilityProxy;
import org.utplsql.api.reporter.CoreReporters;
import org.utplsql.api.reporter.ReporterFactory;
import org.utplsql.cli.reporters.LocalAssetsCoverageHTMLReporter;
import java.sql.Connection;
import java.sql.SQLException;
/**
* A simple class to provide a ReporterFactory for the RunCommand
*
* @author pesse
*/
class ReporterFactoryProvider {
public static ReporterFactory createReporterFactory(CompatibilityProxy proxy) {
ReporterFactory reporterFactory = ReporterFactory.createDefault(proxy);
reporterFactory.registerReporterFactoryMethod(CoreReporters.UT_COVERAGE_HTML_REPORTER.name(), LocalAssetsCoverageHTMLReporter::new, "Will copy all necessary assets to a folder named after the Output-File");
return reporterFactory;
}
public static ReporterFactory createReporterFactory(Connection con) throws SQLException {
return createReporterFactory(new CompatibilityProxy(con));
}
}