use of org.ovirt.engine.core.common.businessentities.VmIcon in project ovirt-engine by oVirt.
the class VmIconDaoTest method testRemoveIfUnusedWithUnused.
@Test
public void testRemoveIfUnusedWithUnused() {
prepareDao().removeIfUnused(UNUSED_ICON_ID);
final VmIcon nothing = prepareDao().get(UNUSED_ICON_ID);
assertNull(nothing);
}
use of org.ovirt.engine.core.common.businessentities.VmIcon in project ovirt-engine by oVirt.
the class VmIconDaoTest method testDeleteAllUnusedIcons.
@Test
public void testDeleteAllUnusedIcons() {
reinitializeDatabase();
prepareDao().removeAllUnusedIcons();
final VmIcon unusedIcon = prepareDao().get(UNUSED_ICON_ID);
assertNull(unusedIcon);
final VmIcon usedIcon = prepareDao().get(FixturesTool.SMALL_ICON_ID);
assertNotNull(usedIcon);
reinitializeDatabase();
}
use of org.ovirt.engine.core.common.businessentities.VmIcon in project ovirt-engine by oVirt.
the class VmIconDaoTest method testGetVmIconByDataUrlWithValidUrl.
@Test
public void testGetVmIconByDataUrlWithValidUrl() {
final List<VmIcon> result = prepareDao().getByDataUrl(OTHER_SMALL_DATAURL);
assertEquals(1, result.size());
assertEquals(new VmIcon(FixturesTool.SMALL_ICON_ID, OTHER_SMALL_DATAURL), result.get(0));
}