Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
3eaad0ed25bd412e0f4b5768c9ec1621639b6a11

59497072634a77ea8a968f82203f65f20da7b718
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>edu.hm.hafner</groupId>
<artifactId>codingstyle-pom</artifactId>
<version>7.0.0</version>
<version>7.1.0</version>
<relativePath />
</parent>

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/edu/hm/hafner/coverage/parser/CloverParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ private void addCountersUsingConditional(final FileNode fileNode, final int line

private TreeString constructPathForFile(
final StartElement fileElement, final String packageName, final String fileName) {
return getOptionalValueOf(fileElement, PATH).map(TreeString::valueOf).orElseGet(() -> getTreeStringBuilder()
.intern(getPath(packageName, fileName)));
return getOptionalValueOf(fileElement, PATH)
.map(TreeString::valueOf)
.orElseGet(() -> getTreeStringBuilder().intern(getPath(packageName, fileName)));
}

private String getPath(final String packageName, final String fileName) {
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/edu/hm/hafner/coverage/ModuleNodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ void shouldSplitPackagesIntoHierarchy() {
assertThat(root.getAll(PACKAGE))
.hasSize(3)
.satisfiesExactly(
s -> assertThat(s).hasName("hafner"), s -> assertThat(s).hasName("hm"), s -> assertThat(s)
.hasName("edu"));
s -> assertThat(s).hasName("hafner"),
s -> assertThat(s).hasName("hm"),
s -> assertThat(s).hasName("edu"));
}

@Test
Expand Down
15 changes: 9 additions & 6 deletions src/test/java/edu/hm/hafner/coverage/NodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1024,10 +1024,12 @@ void shouldUsePessimisticValueBasedOnMetricTendencyWhenMerging() {
assertThat(mergedClass.getValue(CYCLOMATIC_COMPLEXITY))
.isPresent()
.hasValueSatisfying(v -> assertThat(v.asInteger()).isEqualTo(7));
assertThat(mergedClass.getValue(WARNINGS)).isPresent().hasValueSatisfying(v -> assertThat(v.asInteger())
.isEqualTo(5));
assertThat(mergedClass.getValue(UNBOUNDED)).isPresent().hasValueSatisfying(v -> assertThat(v.asInteger())
.isEqualTo(4));
assertThat(mergedClass.getValue(WARNINGS))
.isPresent()
.hasValueSatisfying(v -> assertThat(v.asInteger()).isEqualTo(5));
assertThat(mergedClass.getValue(UNBOUNDED))
.isPresent()
.hasValueSatisfying(v -> assertThat(v.asInteger()).isEqualTo(4));
}

@Test
Expand Down Expand Up @@ -1119,8 +1121,9 @@ void shouldNotLoseOtherValuesWhenMergingNodes() {
assertThat(mergedMethod.getValue(CYCLOMATIC_COMPLEXITY))
.isPresent()
.hasValueSatisfying(v -> assertThat(v.asInteger()).isEqualTo(3)); // max(2,3)
assertThat(mergedMethod.getValue(LOC)).isPresent().hasValueSatisfying(v -> assertThat(v.asInteger())
.isEqualTo(8)); // max(5,8)
assertThat(mergedMethod.getValue(LOC))
.isPresent()
.hasValueSatisfying(v -> assertThat(v.asInteger()).isEqualTo(8)); // max(5,8)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ void testCloverWithClasses() {
void testRelativePathFromPackage() {
var root = readReport("clover-declarative.xml");

assertThat(root.getAllFileNodes()).hasSize(1).satisfiesExactlyInAnyOrder(file -> assertThat(file)
.hasName(CLOVER_PUBLISHER)
.hasRelativePath("hudson/plugins/clover/CloverPublisher.java"));
assertThat(root.getAllFileNodes())
.hasSize(1)
.satisfiesExactlyInAnyOrder(file -> assertThat(file)
.hasName(CLOVER_PUBLISHER)
.hasRelativePath("hudson/plugins/clover/CloverPublisher.java"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ void shouldRemovePrefixOfDeterministicCoverageReport() {
.map(FileNode::getRelativePath)
.allSatisfy(file -> assertThat(file).doesNotStartWith("/_/").startsWith("Lib.LicenseScanner/"));

assertThat(root.getAllFileNodes()).hasSize(20).first().satisfies(file -> assertThat(file)
.hasName("IssueKeys.cs")
.hasRelativePath("Lib.LicenseScanner/IssueKeys.cs"));
assertThat(root.getAllFileNodes())
.hasSize(20)
.first()
.satisfies(file ->
assertThat(file).hasName("IssueKeys.cs").hasRelativePath("Lib.LicenseScanner/IssueKeys.cs"));
}

@Test
Expand Down Expand Up @@ -286,10 +288,13 @@ void shouldMergeCorrectly() {
builder.withMetric(LINE).withCovered(16).withMissed(6).build(),
builder.withMetric(BRANCH).withCovered(0).withMissed(3).build(),
new Value(LOC, 22));
assertThat(b.getAllFileNodes()).hasSize(1).element(0).satisfies(fileNode -> assertThat(fileNode)
.hasMissedLines(36, 37, 38, 40, 41, 42)
.doesNotHaveCoveredLines(36, 37, 38, 40, 41, 42)
.hasCoveredLines(1, 5, 6, 7, 8, 9, 10, 11, 20, 35, 45, 54, 60, 66, 71, 72));
assertThat(b.getAllFileNodes())
.hasSize(1)
.element(0)
.satisfies(fileNode -> assertThat(fileNode)
.hasMissedLines(36, 37, 38, 40, 41, 42)
.doesNotHaveCoveredLines(36, 37, 38, 40, 41, 42)
.hasCoveredLines(1, 5, 6, 7, 8, 9, 10, 11, 20, 35, 45, 54, 60, 66, 71, 72));

var expectedValuesAfterMerge = new Value[] {
builder.withMetric(MODULE).withCovered(1).withMissed(0).build(),
Expand All @@ -310,9 +315,13 @@ void shouldMergeCorrectly() {
}

private void verifyMissedAndCoveredLines(final Node left) {
assertThat(left.getAllFileNodes()).hasSize(1).element(0).satisfies(fileNode -> assertThat(fileNode)
.hasNoMissedLines()
.hasCoveredLines(1, 5, 6, 7, 8, 9, 10, 11, 20, 35, 36, 37, 38, 40, 41, 42, 45, 54, 60, 66, 71, 72));
assertThat(left.getAllFileNodes())
.hasSize(1)
.element(0)
.satisfies(fileNode -> assertThat(fileNode)
.hasNoMissedLines()
.hasCoveredLines(
1, 5, 6, 7, 8, 9, 10, 11, 20, 35, 36, 37, 38, 40, 41, 42, 45, 54, 60, 66, 71, 72));
}

@Test
Expand Down
105 changes: 65 additions & 40 deletions src/test/java/edu/hm/hafner/coverage/parser/JacocoParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,18 @@
.filter(m -> "<init>(II)V".equals(m.getName()))
.collect(Collectors.toList());

assertThat(children).hasSize(1).element(0).isInstanceOfSatisfying(MethodNode.class, m -> assertThat(m)
.hasName("<init>(II)V")
.hasSignature("(II)V")
.hasValues(
createLineCoverage(10 - missed, missed),
createBranchCoverage(2 + 4 - missed, 2 - (4 - missed)),
new Value(CYCLOMATIC_COMPLEXITY, 3)));
assertThat(children)
.hasSize(1)
.element(0)
.isInstanceOfSatisfying(
MethodNode.class,
m -> assertThat(m)
.hasName("<init>(II)V")
.hasSignature("(II)V")
.hasValues(
createLineCoverage(10 - missed, missed),
createBranchCoverage(2 + 4 - missed, 2 - (4 - missed)),
new Value(CYCLOMATIC_COMPLEXITY, 3)));

assertThat(a)
.hasValues(
Expand Down Expand Up @@ -164,16 +169,20 @@
var left = new ModuleNode("root");
model.getAll(PACKAGE).forEach(p -> left.addChild(p.copyTree()));

assertThat(left.find(PACKAGE, "edu.hm.hafner.util")).isPresent().get().satisfies(p -> assertThat(
p.getValue(LINE))
.contains(builder.withCovered(60).withTotal(62).build()));
assertThat(left.find(PACKAGE, "edu.hm.hafner.util"))
.isPresent()
.get()
.satisfies(p -> assertThat(p.getValue(LINE))
.contains(builder.withCovered(60).withTotal(62).build()));

var right = new ModuleNode("root");
style.getAll(PACKAGE).forEach(p -> right.addChild(p.copyTree()));

assertThat(right.find(PACKAGE, "edu.hm.hafner.util")).isPresent().get().satisfies(p -> assertThat(
p.getValue(LINE))
.contains(builder.withCovered(294).withTotal(323).build()));
assertThat(right.find(PACKAGE, "edu.hm.hafner.util"))
.isPresent()
.get()
.satisfies(p -> assertThat(p.getValue(LINE))
.contains(builder.withCovered(294).withTotal(323).build()));

if (splitPackages) {
left.splitPackages();
Expand All @@ -183,8 +192,13 @@
var merged = left.merge(right);

var packageName = splitPackages ? "util" : "edu.hm.hafner.util";
assertThat(merged.find(PACKAGE, packageName)).isPresent().get().satisfies(p -> assertThat(p.getValue(LINE))
.contains(builder.withCovered(294 + 60).withTotal(323 + 62).build()));
assertThat(merged.find(PACKAGE, packageName))
.isPresent()
.get()
.satisfies(p -> assertThat(p.getValue(LINE))
.contains(builder.withCovered(294 + 60)
.withTotal(323 + 62)
.build()));
}

@Test
Expand All @@ -195,9 +209,10 @@
assertThat(model.getAll(PACKAGE))
.extracting(Node::getName)
.containsExactly("fooDirectory", "fooDirectory.#_child_directory");
assertThat(model.findPackage("fooDirectory")).hasValueSatisfying(p -> assertThat(p.getAllFileNodes())
.map(FileNode::getFileName)
.containsExactly("Invoke-Foo.ps1", "Invoke-FooPlain.ps1", "Invoke-FooPlain2.ps1"));
assertThat(model.findPackage("fooDirectory"))
.hasValueSatisfying(p -> assertThat(p.getAllFileNodes())
.map(FileNode::getFileName)
.containsExactly("Invoke-Foo.ps1", "Invoke-FooPlain.ps1", "Invoke-FooPlain2.ps1"));
assertThat(model.findPackage("fooDirectory.#_child_directory"))
.hasValueSatisfying(p -> assertThat(p.getAllFileNodes())
.map(FileNode::getFileName)
Expand All @@ -217,11 +232,12 @@
var module = readReport("jacocoTestReport.xml");

assertThat(module.getAll(PACKAGE)).hasSize(1);
assertThat(module.findFile("CodeCoverageCategory.groovy")).isPresent().hasValueSatisfying(file -> assertThat(
file.findClass("org.aboe026.CodeCoverageCategory"))
assertThat(module.findFile("CodeCoverageCategory.groovy"))
.isPresent()
.hasValueSatisfying(
classNode -> assertThat(file.getAll(METHOD).size()).isEqualTo(3)));
.hasValueSatisfying(file -> assertThat(file.findClass("org.aboe026.CodeCoverageCategory"))
.isPresent()
.hasValueSatisfying(classNode ->
assertThat(file.getAll(METHOD).size()).isEqualTo(3)));

var methods = module.getAll(METHOD);
assertThat(methods).hasSize(68);
Expand Down Expand Up @@ -266,23 +282,25 @@
.withMissed(90)
.build(),
new Value(LOC, 294 + 29),
new Value(CYCLOMATIC_COMPLEXITY, 160));

assertThat(tree.getChildren()).hasSize(1).element(0).satisfies(packageNode -> assertThat(packageNode)
.hasName("edu.hm.hafner.util"));
assertThat(tree.getChildren())
.hasSize(1)
.element(0)
.satisfies(packageNode -> assertThat(packageNode).hasName("edu.hm.hafner.util"));

var any = tree.getAll(FILE).stream()
.filter(n -> "Ensure.java".equals(n.getName()))
.findAny()
.orElseThrow(() -> new NoSuchElementException("Blub"));
assertThat(any.getValue(LINE))
.contains(
builder.withMetric(LINE).withCovered(100).withMissed(25).build());
assertThat(any.getValue(LOC)).contains(new Value(LOC, 125));
assertThat(any.getValue(BRANCH))
.contains(
builder.withMetric(BRANCH).withCovered(40).withMissed(6).build());
assertThat(any.getValue(CYCLOMATIC_COMPLEXITY)).contains(new Value(CYCLOMATIC_COMPLEXITY, 68));

Check notice on line 303 in src/test/java/edu/hm/hafner/coverage/parser/JacocoParserTest.java

View check run for this annotation

ci.jenkins.io / CPD

CPD

Found duplicated code.
Raw output
<pre><code>new Value(CYCLOMATIC_COMPLEXITY, 160)); assertThat(tree.getChildren()) .hasSize(1) .element(0) .satisfies(packageNode -&gt; assertThat(packageNode).hasName(&#34;edu.hm.hafner.util&#34;)); var any &#61; tree.getAll(FILE).stream() .filter(n -&gt; &#34;Ensure.java&#34;.equals(n.getName())) .findAny() .orElseThrow(() -&gt; new NoSuchElementException(&#34;Blub&#34;)); assertThat(any.getValue(LINE)) .contains( builder.withMetric(LINE).withCovered(100).withMissed(25).build()); assertThat(any.getValue(LOC)).contains(new Value(LOC, 125)); assertThat(any.getValue(BRANCH)) .contains( builder.withMetric(BRANCH).withCovered(40).withMissed(6).build()); assertThat(any.getValue(CYCLOMATIC_COMPLEXITY)).contains(new Value(CYCLOMATIC_COMPLEXITY, 68));</code></pre>

verifyCoverageMetrics(tree);

Expand Down Expand Up @@ -313,23 +331,25 @@
builder.withMetric(PACKAGE).withCovered(1).withMissed(0).build(),
builder.withMetric(FILE).withCovered(7).withMissed(1).build(),
builder.withMetric(CLASS).withCovered(15).withMissed(1).build(),
builder.withMetric(METHOD).withCovered(97).withMissed(5).build());

assertThat(tree.getChildren()).hasSize(1).element(0).satisfies(packageNode -> assertThat(packageNode)
.hasName("edu.hm.hafner.util"));
assertThat(tree.getChildren())
.hasSize(1)
.element(0)
.satisfies(packageNode -> assertThat(packageNode).hasName("edu.hm.hafner.util"));

var any = tree.getAll(FILE).stream()
.filter(n -> "Ensure.java".equals(n.getName()))
.findAny()
.orElseThrow(() -> new NoSuchElementException("Blub"));
assertThat(any.getValue(LINE))
.contains(
builder.withMetric(LINE).withCovered(100).withMissed(25).build());
assertThat(any.getValue(LOC)).contains(new Value(LOC, 125));
assertThat(any.getValue(BRANCH))
.contains(
builder.withMetric(BRANCH).withCovered(40).withMissed(6).build());
assertThat(any.getValue(CYCLOMATIC_COMPLEXITY)).contains(new Value(CYCLOMATIC_COMPLEXITY, 68));

Check notice on line 352 in src/test/java/edu/hm/hafner/coverage/parser/JacocoParserTest.java

View check run for this annotation

ci.jenkins.io / CPD

CPD

Found duplicated code.
Raw output
<pre><code>new Value(CYCLOMATIC_COMPLEXITY, 160)); assertThat(tree.getChildren()) .hasSize(1) .element(0) .satisfies(packageNode -&gt; assertThat(packageNode).hasName(&#34;edu.hm.hafner.util&#34;)); var any &#61; tree.getAll(FILE).stream() .filter(n -&gt; &#34;Ensure.java&#34;.equals(n.getName())) .findAny() .orElseThrow(() -&gt; new NoSuchElementException(&#34;Blub&#34;)); assertThat(any.getValue(LINE)) .contains( builder.withMetric(LINE).withCovered(100).withMissed(25).build()); assertThat(any.getValue(LOC)).contains(new Value(LOC, 125)); assertThat(any.getValue(BRANCH)) .contains( builder.withMetric(BRANCH).withCovered(40).withMissed(6).build()); assertThat(any.getValue(CYCLOMATIC_COMPLEXITY)).contains(new Value(CYCLOMATIC_COMPLEXITY, 68));</code></pre>

var log = tree.findFile("TreeStringBuilder.java").orElseThrow();
assertThat(log.getMissedLines()).containsExactly(61, 62);
Expand Down Expand Up @@ -409,53 +429,58 @@
.build();
assertThat(tree.aggregateValues()).contains(coverage);

assertThat(tree.getChildren()).hasSize(1).element(0).satisfies(packageNode -> assertThat(packageNode)
.hasName("edu")
.hasParent()
.hasParentName(PROJECT_NAME));
assertThat(tree.getChildren())
.hasSize(1)
.element(0)
.satisfies(packageNode ->
assertThat(packageNode).hasName("edu").hasParent().hasParentName(PROJECT_NAME));
}

@Test
void shouldCreatePackageName() {
var tree = readExampleReport();

var fileName = "Ensure.java";
assertThat(tree.find(FILE, fileName)).isNotEmpty().hasValueSatisfying(node -> assertThat(node)
.hasName(fileName)
.hasParentName("edu.hm.hafner.util")
.hasParent()
.isNotRoot());
assertThat(tree.find(FILE, fileName))
.isNotEmpty()
.hasValueSatisfying(node -> assertThat(node)
.hasName(fileName)
.hasParentName("edu.hm.hafner.util")
.hasParent()
.isNotRoot());

tree.splitPackages();
assertThat(tree.find(FILE, fileName)).isNotEmpty().hasValueSatisfying(node -> assertThat(node)
.hasName(fileName)
.hasParentName("edu.hm.hafner.util")
.hasParent()
.isNotRoot());
assertThat(tree.find(FILE, fileName))
.isNotEmpty()
.hasValueSatisfying(node -> assertThat(node)
.hasName(fileName)
.hasParentName("edu.hm.hafner.util")
.hasParent()
.isNotRoot());
}

private void verifyCoverageMetrics(final Node tree) {
List<Node> nodes = tree.getAll(FILE);

long missedInstructions = 0;
long coveredInstructions = 0;
long missedBranches = 0;
long coveredBranches = 0;
long missedLines = 0;
long coveredLines = 0;
for (Node node : nodes) {
var instructionCoverage = (Coverage) node.getValue(INSTRUCTION).orElse(Coverage.nullObject(INSTRUCTION));
missedInstructions = missedInstructions + instructionCoverage.getMissed();
coveredInstructions = coveredInstructions + instructionCoverage.getCovered();
var branchCoverage = (Coverage) node.getValue(BRANCH).orElse(Coverage.nullObject(BRANCH));
missedBranches = missedBranches + branchCoverage.getMissed();
coveredBranches = coveredBranches + branchCoverage.getCovered();
var lineCoverage = (Coverage) node.getValue(LINE).orElse(Coverage.nullObject(LINE));
missedLines = missedLines + lineCoverage.getMissed();
coveredLines = coveredLines + lineCoverage.getCovered();
}

assertThat(missedInstructions).isEqualTo(90);

Check notice on line 483 in src/test/java/edu/hm/hafner/coverage/parser/JacocoParserTest.java

View check run for this annotation

ci.jenkins.io / CPD

CPD

Found duplicated code.
Raw output
<pre><code>} private void verifyCoverageMetrics(final Node tree) { List&lt;Node&gt; nodes &#61; tree.getAll(FILE); long missedInstructions &#61; 0; long coveredInstructions &#61; 0; long missedBranches &#61; 0; long coveredBranches &#61; 0; long missedLines &#61; 0; long coveredLines &#61; 0; for (Node node : nodes) { var instructionCoverage &#61; (Coverage) node.getValue(INSTRUCTION).orElse(Coverage.nullObject(INSTRUCTION)); missedInstructions &#61; missedInstructions &#43; instructionCoverage.getMissed(); coveredInstructions &#61; coveredInstructions &#43; instructionCoverage.getCovered(); var branchCoverage &#61; (Coverage) node.getValue(BRANCH).orElse(Coverage.nullObject(BRANCH)); missedBranches &#61; missedBranches &#43; branchCoverage.getMissed(); coveredBranches &#61; coveredBranches &#43; branchCoverage.getCovered(); var lineCoverage &#61; (Coverage) node.getValue(LINE).orElse(Coverage.nullObject(LINE)); missedLines &#61; missedLines &#43; lineCoverage.getMissed(); coveredLines &#61; coveredLines &#43; lineCoverage.getCovered(); } assertThat(missedInstructions).isEqualTo(90);</code></pre>
assertThat(coveredInstructions).isEqualTo(1260);
assertThat(missedBranches).isEqualTo(7);
assertThat(coveredBranches).isEqualTo(109);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,21 @@ void shouldReadWithMissingSourceLine() {
@Test
void shouldCreatePackageName() {
var tree = readExampleReport();
assertThat(tree.find(PACKAGE, "-")).isNotEmpty().hasValueSatisfying(node -> assertThat(node)
.hasName("-")
.hasParentName("-.MyLogging")
.hasParent()
.isNotRoot());
assertThat(tree.find(PACKAGE, "-"))
.isNotEmpty()
.hasValueSatisfying(node -> assertThat(node)
.hasName("-")
.hasParentName("-.MyLogging")
.hasParent()
.isNotRoot());
var fileName = "MyLogging.FancyClass.cs";
assertThat(tree.find(FILE, fileName)).isNotEmpty().hasValueSatisfying(node -> assertThat(node)
.hasName(fileName)
.hasParentName("-")
.hasParent()
.isNotRoot());
assertThat(tree.find(FILE, fileName))
.isNotEmpty()
.hasValueSatisfying(node -> assertThat(node)
.hasName(fileName)
.hasParentName("-")
.hasParent()
.isNotRoot());
}

@Test
Expand Down Expand Up @@ -97,11 +101,12 @@ void shouldDetectMethodCoverage() {
var module = readExampleReport();

assertThat(module.getAll(PACKAGE)).hasSize(1);
assertThat(module.findFile("MyLogging.FancyClass.cs")).isPresent().hasValueSatisfying(file -> assertThat(
file.findClass("MyLogging.FancyClass"))
assertThat(module.findFile("MyLogging.FancyClass.cs"))
.isPresent()
.hasValueSatisfying(
classNode -> assertThat(file.getAll(METHOD).size()).isEqualTo(14)));
.hasValueSatisfying(file -> assertThat(file.findClass("MyLogging.FancyClass"))
.isPresent()
.hasValueSatisfying(classNode ->
assertThat(file.getAll(METHOD).size()).isEqualTo(14)));

var methods = module.getAll(METHOD);
assertThat(methods).hasSize(21);
Expand Down Expand Up @@ -162,11 +167,19 @@ private void verifyLineCoverage(final FileNode a) {
.equals(m.getName()))
.collect(Collectors.toList());

assertThat(children).hasSize(1).element(0).isInstanceOfSatisfying(MethodNode.class, m -> assertThat(m)
.hasName(
"System.Boolean MyLogging.FancyClass::get_IsMyCodeWrittenWell()System.Boolean MyLogging.FancyClass::get_IsMyCodeWrittenWell()")
.hasSignature("System.Boolean MyLogging.FancyClass::get_IsMyCodeWrittenWell()")
.hasValues(createLineCoverage(1, 0), createBranchCoverage(1, 1), new Value(CYCLOMATIC_COMPLEXITY, 2)));
assertThat(children)
.hasSize(1)
.element(0)
.isInstanceOfSatisfying(
MethodNode.class,
m -> assertThat(m)
.hasName(
"System.Boolean MyLogging.FancyClass::get_IsMyCodeWrittenWell()System.Boolean MyLogging.FancyClass::get_IsMyCodeWrittenWell()")
.hasSignature("System.Boolean MyLogging.FancyClass::get_IsMyCodeWrittenWell()")
.hasValues(
createLineCoverage(1, 0),
createBranchCoverage(1, 1),
new Value(CYCLOMATIC_COMPLEXITY, 2)));
}

private Coverage createBranchCoverage(final int covered, final int missed) {
Expand Down
Loading
Loading