// TCC 4 because it doesn't double count for the same offense within one method
assertEquals(4, methodCost.getTotalCost().getCyclomaticComplexityCost());
}
public void testPrivateTcc4Cost() throws Exception {
MethodCost methodCost = cost("void methodPrivateTcc4()");
assertEquals(4, methodCost.getCost().getCyclomaticComplexityCost());
assertEquals(0, methodCost.getCost().getGlobalCost());
assertEquals(0, methodCost.getTotalCost().getGlobalCost());
assertEquals(4, methodCost.getTotalCost().getCyclomaticComplexityCost());
methodCost = cost("void methodTcc4BecausePrivateMethodCalls()");
assertEquals(0, methodCost.getCost().getCyclomaticComplexityCost());
assertEquals(0, methodCost.getCost().getGlobalCost());
assertEquals(0, methodCost.getTotalCost().getGlobalCost());
// TCC 4 because it doesn't double count for the same offense within one method
assertEquals(4, methodCost.getTotalCost().getCyclomaticComplexityCost());
}