Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- @Verifies(value = "should fail while saving a conceptNameTag which has just been edited", method = "validate(Object,Errors)")
- public void validate_shouldFailWhileSavingAConceptNameTagWhichHasJustBeenEdited() throws Exception {
- String errorMsg = "failed while saving the conceptNameTag that has just been edited";
- ConceptNameTag cnt = Context.getConceptService().getConceptNameTag(1);
- cnt.setTag("tag");
- Errors errors = new BindException(cnt, errorMsg);
- ConceptService c = Context.getConceptService();
- new ConceptNameTagValidator().validate(cnt, errors);
- c.saveConceptNameTag(cnt);
- Assert.assertTrue(errors.hasErrors());
- }
Advertisement
Add Comment
Please, Sign In to add comment