Skip to content

Commit

Permalink
build(deps): bump pitest-plugin.version from 1.10.4 to 1.11.0 (#169)
Browse files Browse the repository at this point in the history
* build(deps): bump pitest-plugin.version from 1.10.4 to 1.11.0

Bumps `pitest-plugin.version` from 1.10.4 to 1.11.0.

Updates `pitest-entry` from 1.10.4 to 1.11.0
- [Release notes](https://github.com/hcoles/pitest/releases)
- [Commits](hcoles/pitest@1.10.4...1.11.0)

Updates `pitest-maven` from 1.10.4 to 1.11.0
- [Release notes](https://github.com/hcoles/pitest/releases)
- [Commits](hcoles/pitest@1.10.4...1.11.0)

---
updated-dependencies:
- dependency-name: org.pitest:pitest-entry
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.pitest:pitest-maven
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update interface

* Fix interfaces

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Rijswijk <git@hugovr.nl>
  • Loading branch information
dependabot[bot] and hugo-vrijswijk authored Feb 2, 2023
1 parent f0190a4 commit 6c0e284
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<properties>
<encoding>UTF-8</encoding>
<revision>MASTER-SNAPSHOT</revision>
<pitest-plugin.version>1.10.4</pitest-plugin.version>
<pitest-plugin.version>1.11.0</pitest-plugin.version>
</properties>

<profiles>
Expand Down
14 changes: 6 additions & 8 deletions src/main/java/org/pitest/elements/MutationReportListener.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.pitest.elements;

import org.pitest.coverage.ClassLines;
import org.pitest.coverage.CoverageDatabase;
import org.pitest.coverage.ReportCoverage;
import org.pitest.mutationtest.ClassMutationResults;
import org.pitest.mutationtest.MutationResultListener;
import org.pitest.mutationtest.SourceLocator;
Expand All @@ -25,7 +25,7 @@ public class MutationReportListener implements MutationResultListener {

private final JsonParser jsonParser;

private final CoverageDatabase coverage;
private final ReportCoverage coverage;
private final PackageSummaryMap packageSummaryData = new PackageSummaryMap();

private static final String HTML_PAGE = "<!DOCTYPE html>\n" + "<html lang=\"en\">\n"
Expand All @@ -51,7 +51,7 @@ public class MutationReportListener implements MutationResultListener {
+ "</body>\n"
+ "</html>";

public MutationReportListener(final CoverageDatabase coverage,
public MutationReportListener(final ReportCoverage coverage,
final ResultOutputStrategy outputStrategy, final SourceLocator... locators) {
this.coverage = coverage;
this.outputStrategy = outputStrategy;
Expand Down Expand Up @@ -102,11 +102,9 @@ private void createMutationTestingElementsJs() {
}

private MutationTestSummaryData createSummaryData(
final CoverageDatabase coverage, final ClassMutationResults data) {
Set<ClassLines> classLines = coverage
.getCoveredLinesForClass(data.getMutatedClass())
.map(Collections::singleton)
.orElseGet(Collections::emptySet);
final ReportCoverage coverage, final ClassMutationResults data) {
Set<ClassLines> classLines = Collections.singleton(coverage
.getCodeLinesForClass(data.getMutatedClass()));
return new MutationTestSummaryData(data.getFileName(), data.getMutations(), classLines);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import org.mockito.MockitoAnnotations;
import org.pitest.coverage.ClassLines;
import org.pitest.coverage.CoverageDatabase;
import org.pitest.coverage.ReportCoverage;
import org.pitest.elements.testutils.MockClassLines;
import org.pitest.mutationtest.SourceLocator;
import org.pitest.util.ResultOutputStrategy;

import java.io.File;
import java.io.Writer;
import java.util.Optional;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
Expand All @@ -22,7 +22,7 @@ public class MutationHtmlReportListenerTest {
private MutationReportListener testee;

@Mock
private CoverageDatabase coverageDb;
private ReportCoverage coverage;

@Mock
private ResultOutputStrategy outputStrategy;
Expand All @@ -40,10 +40,10 @@ public void setUp() {
when(this.outputStrategy.createWriterForFile(any(String.class)))
.thenReturn(this.writer);
ClassLines classLines = MockClassLines.create(("foo"));
when(this.coverageDb.getCoveredLinesForClass(any())).thenReturn(
Optional.of(classLines));
when(this.coverage.getCodeLinesForClass(any())).thenReturn(
classLines);

this.testee = new MutationReportListener(this.coverageDb,
this.testee = new MutationReportListener(this.coverage,
this.outputStrategy, this.sourceLocator);
}

Expand Down

0 comments on commit 6c0e284

Please sign in to comment.