Search in sources :

Example 1 with PostJobContext

use of org.sonar.api.batch.postjob.PostJobContext in project sonarqube by SonarSource.

the class XooPostJobTest method increaseCoverage.

@Test
public void increaseCoverage() {
    new XooPostJob().describe(new DefaultPostJobDescriptor());
    PostJobContext context = mock(PostJobContext.class);
    when(context.issues()).thenReturn(Arrays.<PostJobIssue>asList());
    when(context.resolvedIssues()).thenReturn(Arrays.<PostJobIssue>asList());
    new XooPostJob().execute(context);
    assertThat(logTester.logs()).contains("Resolved issues: 0", "Open issues: 0");
}
Also used : DefaultPostJobDescriptor(org.sonar.api.batch.postjob.internal.DefaultPostJobDescriptor) PostJobContext(org.sonar.api.batch.postjob.PostJobContext) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 PostJobContext (org.sonar.api.batch.postjob.PostJobContext)1 DefaultPostJobDescriptor (org.sonar.api.batch.postjob.internal.DefaultPostJobDescriptor)1