I am writing unit test to verify that a private method closes the stream.
unit test calls method B and the variable is null
unit test doesn't mock a class when testing
The private method is in the public method that I am calling.
Using emma in eclipse (via the eclemma plugin) the method call appears as not covered, although the code inside the method
eg
public methodA(){
if (something==null) {
methodB();
}
}
private methodB(){
lineCoveredByTest;
}
Why doesn't the method call stand out as covered?
Craig angus
source
share