k-joseph

Untitled

Sep 1st, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. @Test
  2. @Verifies(value = "should fail while saving a conceptNameTag which has just been edited", method = "validate(Object,Errors)")
  3. public void validate_shouldFailWhileSavingAConceptNameTagWhichHasJustBeenEdited() throws Exception {
  4. String errorMsg = "failed while saving the conceptNameTag that has just been edited";
  5.  
  6. ConceptNameTag cnt = Context.getConceptService().getConceptNameTag(1);
  7. cnt.setTag("tag");
  8.  
  9. Errors errors = new BindException(cnt, errorMsg);
  10. ConceptService c = Context.getConceptService();
  11.  
  12. new ConceptNameTagValidator().validate(cnt, errors);
  13. c.saveConceptNameTag(cnt);
  14. Assert.assertTrue(errors.hasErrors());
  15. }
Advertisement
Add Comment
Please, Sign In to add comment