public class Clazz {
Chain root = null;
public Chain theMethod(boolean deep) {
return !deep ? root : root.next;
}
class Chain {
Chain next = null;
}
}
に対して、
public class ClazzTest extends TestCase {
public void testTheMethod() {
assertNull(new Clazz().theMethod(false));
}
}
というテストをするとき、
root.next のテストしてないけど、これってC0満たす?
そんなの吉野家じゃない....
カバレジの件、「?:演算子は制御フローなのでC0満たしていない」だと思います。
つっかえが取れました。ありがとうございます。