|
| 1 | +packageio.github.utplsql.api; |
| 2 | + |
| 3 | +importio.github.utplsql.api.reporter.*; |
| 4 | +importorg.junit.Assert; |
| 5 | +importorg.junit.Test; |
| 6 | + |
| 7 | +importjava.sql.SQLException; |
| 8 | + |
| 9 | +publicclassReporterNameTest { |
| 10 | + |
| 11 | +@Test |
| 12 | +publicvoidreporterSQLTypeName()throwsSQLException { |
| 13 | +Assert.assertEquals(CustomTypes.UT_COVERAGE_HTML_REPORTER,newCoverageHTMLReporter().getSQLTypeName()); |
| 14 | +Assert.assertEquals(CustomTypes.UT_COVERAGE_SONAR_REPORTER,newCoverageSonarReporter().getSQLTypeName()); |
| 15 | +Assert.assertEquals(CustomTypes.UT_COVERALLS_REPORTER,newCoverallsReporter().getSQLTypeName()); |
| 16 | +Assert.assertEquals(CustomTypes.UT_DOCUMENTATION_REPORTER,newDocumentationReporter().getSQLTypeName()); |
| 17 | +Assert.assertEquals(CustomTypes.UT_SONAR_TEST_REPORTER,newSonarTestReporter().getSQLTypeName()); |
| 18 | +Assert.assertEquals(CustomTypes.UT_TEAMCITY_REPORTER,newTeamCityReporter().getSQLTypeName()); |
| 19 | +Assert.assertEquals(CustomTypes.UT_XUNIT_REPORTER,newXUnitReporter().getSQLTypeName()); |
| 20 | + } |
| 21 | + |
| 22 | +@Test |
| 23 | +publicvoidreporterFactory() { |
| 24 | +Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_COVERAGE_HTML_REPORTER) |
| 25 | +instanceofCoverageHTMLReporter); |
| 26 | +Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_COVERAGE_SONAR_REPORTER) |
| 27 | +instanceofCoverageSonarReporter); |
| 28 | +Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_COVERALLS_REPORTER) |
| 29 | +instanceofCoverallsReporter); |
| 30 | +Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_DOCUMENTATION_REPORTER) |
| 31 | +instanceofDocumentationReporter); |
| 32 | +Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_SONAR_TEST_REPORTER) |
| 33 | +instanceofSonarTestReporter); |
| 34 | +Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_TEAMCITY_REPORTER) |
| 35 | +instanceofTeamCityReporter); |
| 36 | +Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_XUNIT_REPORTER) |
| 37 | +instanceofXUnitReporter); |
| 38 | + } |
| 39 | + |
| 40 | +} |