use of org.ovirt.engine.core.common.businessentities.VmPool in project ovirt-engine by oVirt.
the class VmPoolDaoTest method testGetFilteredWithPermissionsNoPermissionsAndNoFilter.
@Test
public void testGetFilteredWithPermissionsNoPermissionsAndNoFilter() {
VmPool result = dao.get(existingVmPool.getVmPoolId(), UNPRIVILEGED_USER_ID, false);
assertGetResult(result);
}
use of org.ovirt.engine.core.common.businessentities.VmPool in project ovirt-engine by oVirt.
the class VmPoolDaoTest method testGetByName.
/**
* Ensures that getting a VM pool by name works as expected.
*/
@Test
public void testGetByName() {
VmPool result = dao.getByName(existingVmPool.getName());
assertNotNull(result);
assertEquals(existingVmPool, result);
}
use of org.ovirt.engine.core.common.businessentities.VmPool in project ovirt-engine by oVirt.
the class VmPoolDaoTest method testGetVmPool.
/**
* Ensures that getting a VM pool works as expected.
*/
@Test
public void testGetVmPool() {
VmPool result = dao.get(existingVmPool.getVmPoolId());
assertGetResult(result);
}
use of org.ovirt.engine.core.common.businessentities.VmPool in project ovirt-engine by oVirt.
the class VmPoolDaoTest method testSaveVmPool.
/**
* Ensures that saving a VM pool works as expected.
*/
@Test
public void testSaveVmPool() {
dao.save(newVmPool);
VmPool result = dao.getByName(newVmPool.getName());
assertNotNull(result);
assertEquals(newVmPool, result);
}
use of org.ovirt.engine.core.common.businessentities.VmPool in project ovirt-engine by oVirt.
the class VmPoolDaoTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
dao = dbFacade.getVmPoolDao();
vmDao = dbFacade.getVmDao();
existingVmPool = dao.get(EXISTING_VM_POOL_ID);
deletableVmPool = dao.get(DELETABLE_VM_POOL_ID);
newVmPool = new VmPool();
newVmPool.setName("New VM Pool");
newVmPool.setVmPoolDescription("This is a new VM pool.");
newVmPool.setClusterId(FixturesTool.CLUSTER);
newVmPoolMap = new VmPoolMap(FREE_VM_ID, EXISTING_VM_POOL_ID);
}
Aggregations