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

Skip to content
Merged
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
Some reporter creation tests
  • Loading branch information
viniciusam committed May 22, 2017
commit c7a5f44a943b85b65610bba2bd27ea1e40e019ad
40 changes: 40 additions & 0 deletions src/test/java/io/github/utplsql/api/ReporterNameTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package io.github.utplsql.api;

import io.github.utplsql.api.reporter.*;
import org.junit.Assert;
import org.junit.Test;

import java.sql.SQLException;

public class ReporterNameTest {

@Test
public void reporterSQLTypeName() throws SQLException {
Assert.assertEquals(CustomTypes.UT_COVERAGE_HTML_REPORTER, new CoverageHTMLReporter().getSQLTypeName());
Assert.assertEquals(CustomTypes.UT_COVERAGE_SONAR_REPORTER, new CoverageSonarReporter().getSQLTypeName());
Assert.assertEquals(CustomTypes.UT_COVERALLS_REPORTER, new CoverallsReporter().getSQLTypeName());
Assert.assertEquals(CustomTypes.UT_DOCUMENTATION_REPORTER, new DocumentationReporter().getSQLTypeName());
Assert.assertEquals(CustomTypes.UT_SONAR_TEST_REPORTER, new SonarTestReporter().getSQLTypeName());
Assert.assertEquals(CustomTypes.UT_TEAMCITY_REPORTER, new TeamCityReporter().getSQLTypeName());
Assert.assertEquals(CustomTypes.UT_XUNIT_REPORTER, new XUnitReporter().getSQLTypeName());
}

@Test
public void reporterFactory() {
Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_COVERAGE_HTML_REPORTER)
instanceof CoverageHTMLReporter);
Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_COVERAGE_SONAR_REPORTER)
instanceof CoverageSonarReporter);
Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_COVERALLS_REPORTER)
instanceof CoverallsReporter);
Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_DOCUMENTATION_REPORTER)
instanceof DocumentationReporter);
Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_SONAR_TEST_REPORTER)
instanceof SonarTestReporter);
Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_TEAMCITY_REPORTER)
instanceof TeamCityReporter);
Assert.assertTrue(ReporterFactory.createReporter(CustomTypes.UT_XUNIT_REPORTER)
instanceof XUnitReporter);
}

}