Paste: x
Author: | y |
Mode: | java |
Date: | Tue, 1 Dec 2009 01:44:39 |
Plain Text |
public class UpdateAdserverSlotTableTestCase extends DbBaseTester {
private Slot slot;
private Account account;
@Before
public void setup() {
Category category = dao.findAll(Category.class).get(0);
account = MockObjectFactory.createBannerSlotWebsiteAndAccount(category, AdDimension.BANNER);
Website site = firstItem(account.getWebsites());
slot = firstItem(site.getSlots());
}
private <T> T firstItem(Set<T> itemSet) {
return itemSet.iterator().next();
}
}
New Annotation