0
我已经测试用例:Junit的验证命令执行
@Test(expected = IllegalArgumentException.class)
public void testRunWithLessThanTwoParameters_IllegalArgumentException()
throws Exception {
final String[] args = { "Less Number of parameters" };
command = spy(new GenerateSummaryReportCommand());
commandLine = new PosixParser().parse(new Options(),Arrays.copyOfRange(args, 0, args.length));
assertEquals(0, command.run(commandLine));
verify(command, times(1)).usage();
}
我想知道是否验证assertEqual便后声明将执行
快速回答,如果assertEquals失败,否。 –