Search in sources :

Example 1 with FakeCoverageProvider

use of com.uber.jenkins.phabricator.coverage.FakeCoverageProvider in project phabricator-jenkins-plugin by uber.

the class BuildResultProcessorTest method testProcessCoverage.

@Test
public void testProcessCoverage() throws Exception {
    CoverageProvider provider = new FakeCoverageProvider(TestUtils.getDefaultLineCoverage());
    processor.processCoverage(provider);
    assertNotNull(processor.getCoverage());
    assertNotNull(processor.getCoverage().get("file.go"));
    assertEquals("NCUC", processor.getCoverage().get("file.go"));
}
Also used : FakeCoverageProvider(com.uber.jenkins.phabricator.coverage.FakeCoverageProvider) CoverageProvider(com.uber.jenkins.phabricator.coverage.CoverageProvider) FakeCoverageProvider(com.uber.jenkins.phabricator.coverage.FakeCoverageProvider) Test(org.junit.Test)

Example 2 with FakeCoverageProvider

use of com.uber.jenkins.phabricator.coverage.FakeCoverageProvider in project phabricator-jenkins-plugin by uber.

the class BuildResultProcessorTest method testProcessEmptyCoverage.

@Test
public void testProcessEmptyCoverage() {
    CoverageProvider provider = new FakeCoverageProvider(null);
    processor.processCoverage(provider);
    assertNull(processor.getCoverage());
}
Also used : FakeCoverageProvider(com.uber.jenkins.phabricator.coverage.FakeCoverageProvider) CoverageProvider(com.uber.jenkins.phabricator.coverage.CoverageProvider) FakeCoverageProvider(com.uber.jenkins.phabricator.coverage.FakeCoverageProvider) Test(org.junit.Test)

Aggregations

CoverageProvider (com.uber.jenkins.phabricator.coverage.CoverageProvider)2 FakeCoverageProvider (com.uber.jenkins.phabricator.coverage.FakeCoverageProvider)2 Test (org.junit.Test)2