/** @return */ private LabelDto addTestLabel() { currentTestLabel = getNextTestLabel(); LabelDto label = new LabelDto(); label.setName(currentTestLabel); LabelDto newDto = bookmarkControl.saveOrUpdateLabel(label); return newDto; }
@Test public void testAddLabel() { try { LabelDto newDto = addTestLabel(); assertEquals( "New Label name incorrect. Test:" + currentTestLabel + " was:" + newDto.getName(), newDto.getName(), currentTestLabel); assertTrue("New Label id incorrect", newDto.getId() > -1); } catch (Exception e) { e.printStackTrace(); fail("exeption:" + e.getMessage()); } }