博客园  :: 首页  :: 联系 :: 订阅 订阅  :: 管理

2013年3月27日

摘要: JIRA now interrogates the InvalidInputException and puts field specific error messages onto the screen.NOTE : Its up to the validator to ensure it gets the field names right for the current screen scheme.For example here is example of a Validator that can put specific errors onto specific fields on 阅读全文

posted @ 2013-03-27 17:46 Bruce Zhang 阅读(452) 评论(0) 推荐(0) 编辑

摘要: 1. 测试类唯一的限制是这个类必须是公有的,可以任意命名。但是通常的做法是在这个类名称的末尾添加“Test”字样。 备注:如果使用Maven执行测试,好像类名必须以“Test”结尾。2. 测试方法唯一的限制是必须添加“@Test”注解,可以任意命名。但是通常的做法是以testXXX方式命名。3. Junit在执行每个@Test方法之前,会单独创建一个新的测试类实例,以保证测试方法之间独立性,避免在测试代码中产生意外的副作用。 因此,我们也不能在测试方法之间重用各个实例变量的值。4. 我们有必要确保能在任何时间运行所有的测试,无论代码发生了什么修改。 阅读全文

posted @ 2013-03-27 13:29 Bruce Zhang 阅读(252) 评论(0) 推荐(0) 编辑

摘要: 1. @Before2. @BeforeClass3. @Test4. @After5. @AfterClass 阅读全文

posted @ 2013-03-27 13:13 Bruce Zhang 阅读(133) 评论(0) 推荐(0) 编辑