JUnitParams可读性参数测试工具
JUnitParams 为 JUnit >=4.6 增加了一个更容易使用的可读性更好的参数测试方式
Example
@RunWith(JUnitParamsRunner.class)
public class PersonTest {
  @Test
  @Parameters({"17, false", 
               "22, true" })
  public void personIsAdult(int age, boolean valid) throws Exception {
    assertThat(new Person(age).isAdult(), is(valid));
  }
} 
See more examples 。
评论
