I am writing a unit test to check that a private method will close a stream.
The unit test calls methodB and the variable something is null
The unit test doesn't mock the class on test
The private method is within a public method that I am calling.
Using emma in eclipse (via the eclemma plugin) the method call is displayed as not being covered even though the code within the method is
e.g
public methodA(){
if (something==null) {
methodB(); //Not displayed as covered
}
}
private methodB(){
lineCoveredByTest; //displayed as covered
}
Why would the method call not be highlighted as being covered?