use of org.ovirt.engine.core.dao.VdsDao in project ovirt-engine by oVirt.
the class NetworkValidatorTest method networkNotUsedByHostsTest.
private void networkNotUsedByHostsTest(Matcher<ValidationResult> matcher, List<VDS> hosts) {
VdsDao hostDao = mock(VdsDao.class);
when(hostDao.getAllForNetwork(any())).thenReturn(hosts);
when(dbFacade.getVdsDao()).thenReturn(hostDao);
assertThat(validator.networkNotUsedByHosts(), matcher);
}
use of org.ovirt.engine.core.dao.VdsDao in project ovirt-engine by oVirt.
the class VirtMonitoringStrategyTest method mockVdsDao.
private VdsDao mockVdsDao() {
VdsDao mock = mock(VdsDao.class);
when(mock.getFirstUpRhelForCluster(clusterId)).thenReturn(vdsFromDb);
return mock;
}
Aggregations