};
}
@Test(groups = { "res-mgmt" })
public void deleteNetwork() {
new Expectations() {
{
resService.isNetworkExistInVc(anyString);
result = true;
}
};
networkSvc.setResService(resService);
networkSvc.setNetworkDao(networkDao);
networkSvc.setClusterDAO(clusterDAO);
networkSvc.addDhcpNetwork("defaultNetwork3", "network3");
new Verifications() {
{
networkDao.insert(withAny(new NetworkEntity()));
}
};
new Expectations() {
{
NetworkEntity network = new NetworkEntity();
network.setIpBlocks(new ArrayList<IpBlockEntity>());
networkDao.findNetworkByName("defaultNetwork3");
result = network;