Slide 39
Slide 39 text
カバレッジは100%だけど…
public boolean judge (int x) {
if( x < 3 ){
return false;
} else if( x > 13 ){
return false;
}
return true;
}
@Test
public void test_short_password{
assertThat( judge(2), is(false));
}
@Test
public void test_long_password{
assertThat( judge(15), is(false));
}
@Test
public void test_valid_password{
assertThat( judge(7), is(true));
}