|
| 1 | +package io.github.utplsql.api; |
| 2 | + |
| 3 | +import io.github.utplsql.api.reporter.*; |
| 4 | +import org.junit.Assert; |
| 5 | +import org.junit.Test; |
| 6 | + |
| 7 | +import java.sql.SQLException; |
| 8 | + |
| 9 | +public class ReporterNameTest { |
| 10 | + |
| 11 | + @Test |
| 12 | + public void reporterSQLTypeName() throws SQLException { |
| 13 | + Assert.assertEquals(CustomTypes.UT_COVERAGE_HTML_REPORTER, new CoverageHTMLReporter().getSQLTypeName()); |
| 14 | + Assert.assertEquals(CustomTypes.UT_COVERAGE_SONAR_REPORTER, new CoverageSonarReporter().getSQLTypeName()); |
| 15 | + Assert.assertEquals(CustomTypes.UT_COVERALLS_REPORTER, new CoverallsReporter().getSQLTypeName()); |
| 16 | + Assert.assertEquals(CustomTypes.UT_DOCUMENTATION_REPORTER, new DocumentationReporter().getSQLTypeName()); |
| 17 | + Assert.assertEquals(CustomTypes.UT_SONAR_TEST_REPORTER, new SonarTestReporter().getSQLTypeName()); |
| 18 | + Assert.assertEquals(CustomTypes.UT_TEAMCITY_REPORTER, new TeamCityReporter().getSQLTypeName()); |
| 19 | + Assert.assertEquals(CustomTypes.UT_XUNIT_REPORTER, new XUnitReporter().getSQLTypeName()); |
| 20 | + } |
| 21 | + |
| 22 | + @Test |
| 23 | + public void reporterFactory() { |
| 24 | + Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_COVERAGE_HTML_REPORTER) |
| 25 | + instanceof CoverageHTMLReporter); |
| 26 | + Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_COVERAGE_SONAR_REPORTER) |
| 27 | + instanceof CoverageSonarReporter); |
| 28 | + Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_COVERALLS_REPORTER) |
| 29 | + instanceof CoverallsReporter); |
| 30 | + Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_DOCUMENTATION_REPORTER) |
| 31 | + instanceof DocumentationReporter); |
| 32 | + Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_SONAR_TEST_REPORTER) |
| 33 | + instanceof SonarTestReporter); |
| 34 | + Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_TEAMCITY_REPORTER) |
| 35 | + instanceof TeamCityReporter); |
| 36 | + Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_XUNIT_REPORTER) |
| 37 | + instanceof XUnitReporter); |
| 38 | + } |
| 39 | + |
| 40 | +} |
0 commit comments