我有这个方法,单元测试都涵盖了这个方法……除了一行,请参见示例。该行正在执行,我可以通过调试和单元测试来验证。
decimal? balance = null;
//other code
else
{
MyClass classBalance = _repository.GetMyClass();
if (classBalance != null)
{
balance = classBalance.Dr- classBalance.Cr; //This line is yellow/partially covered, the rest is all covered.
}
}