Skip to content

Commit

Permalink
fixed constructor name
Browse files Browse the repository at this point in the history
  • Loading branch information
starkda committed Mar 24, 2024
1 parent 064c9a4 commit 9f4fc55
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/test/java/org/jpeek/metrics/CcmTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,6 @@ void manyComponentInClassTest() throws Exception {
report.assertValue(0.0f, 0.001f);
}

@Test
void oneComponentInClassTest() throws Exception {
final MetricBase.Report report = new MetricBase(
"org/jpeek/metrics/CCM.xsl"
).transform(
"CcmOneComp"
);
report.assertVariable("methods", 5);
report.assertVariable("nc", 10);
report.assertVariable("nmp", 10);
report.assertVariable("ncc", 1);
report.assertValue(1.0f, 0.001f);
}

/**
* Class with one method access one attribute and
* Ctor with all attributes initialization have the same
Expand All @@ -86,6 +72,20 @@ void manyComponentWithCtorInClassTest() throws Exception {
report.assertValue(0.0f, 0.001f);
}

@Test
void oneComponentInClassTest() throws Exception {
final MetricBase.Report report = new MetricBase(
"org/jpeek/metrics/CCM.xsl"
).transform(
"CcmOneComp"
);
report.assertVariable("methods", 5);
report.assertVariable("nc", 10);
report.assertVariable("nmp", 10);
report.assertVariable("ncc", 1);
report.assertValue(1.0f, 0.001f);
}

/**
* Check ccm metric for mixed usage: attribute usage, methods calls.
* @todo #522:30min there is a 4th step for incorrect calculation: nc
Expand Down

0 comments on commit 9f4fc55

Please sign in to comment.