btag1 = tagDao.getBookmarkTag(1);
assertEquals(1,btag1.getCount());
}
public void testSubtractTagCountOne() throws Exception{
Tag tag = tagDao.getTag(2);
BookmarkTag btag = tagDao.getBookmarkTag(2);
LinkTag ltag = tagDao.getLinkTag(2);
UserTag utag = tagDao.getUserTag(2);
assertEquals(100,tag.getCount());
assertEquals(1,btag.getCount());
assertEquals(1,ltag.getCount());
assertEquals(1,utag.getCount());
boolean[] opOkay = tagDao.subtractTagCountOne(new Tag[]{tag}, new User(1), new Link(1), new Bookmark(1));
assertTrue(opOkay[0]);
tag = tagDao.getTag(2);
btag = tagDao.getBookmarkTag(2);
ltag = tagDao.getLinkTag(2);
utag = tagDao.getUserTag(2);
assertEquals(99,tag.getCount());
assertEquals(0,btag.getCount());
assertEquals(0,ltag.getCount());
assertEquals(0,utag.getCount());
}