@Test public void existsVmReturnsFalseWhenTheVmDoesNotExist() { Assert.assertFalse(fakeCloudMiddleware.existsVm("fakeId")); }
@Override public boolean existsVm(String vmId) { return getVmById(vmId) != null; }
FakeCloudMiddleware implements CloudMiddleware { @Override public boolean existsVm(String vmId) { return getVmById(vmId) != null; } }
FakeCloudMiddleware implements CloudMiddleware { @Override public boolean existsVm(String vmId) { return getVmById(vmId) != null; } FakeCloudMiddleware(List<HostFake> hosts); }
FakeCloudMiddleware implements CloudMiddleware { @Override public boolean existsVm(String vmId) { return getVmById(vmId) != null; } FakeCloudMiddleware(List<HostFake> hosts); @Override String deploy(Vm vm, String hostname); @Override String deployWithVolume(Vm vm, String hostname, String isoPath); @Override void destroy(String vmId); @Override void migrate(String vmId, String destinationNodeHostName); @Override List<String> getAllVMsIds(); @Override List<String> getScheduledNonDeployedVmsIds(); @Override VmDeployed getVM(String vmId); @Override boolean existsVm(String vmId); @Override void rebootHardVm(String vmId); @Override void rebootSoftVm(String vmId); @Override void startVm(String vmId); @Override void stopVm(String vmId); @Override void suspendVm(String vmId); @Override void resumeVm(String vmId); @Override List<ImageUploaded> getVmImages(); @Override String createVmImage(ImageToUpload imageToUpload); @Override ImageUploaded getVmImage(String imageId); @Override void deleteVmImage(String id); @Override void assignFloatingIp(String vmId); void deleteAllVmImages(); HostFake getHost(String hostname); void addHost(HostFake host); @Override Map<String, String> getFlavours(); @Override void resize(String vmId, VmRequirements vm); @Override void confirmResize(String vmId); @Override Map<String, HardwareInfo> getHypervisors(String region); @Override Host createHost(String hostname); }
FakeCloudMiddleware implements CloudMiddleware { @Override public boolean existsVm(String vmId) { return getVmById(vmId) != null; } FakeCloudMiddleware(List<HostFake> hosts); @Override String deploy(Vm vm, String hostname); @Override String deployWithVolume(Vm vm, String hostname, String isoPath); @Override void destroy(String vmId); @Override void migrate(String vmId, String destinationNodeHostName); @Override List<String> getAllVMsIds(); @Override List<String> getScheduledNonDeployedVmsIds(); @Override VmDeployed getVM(String vmId); @Override boolean existsVm(String vmId); @Override void rebootHardVm(String vmId); @Override void rebootSoftVm(String vmId); @Override void startVm(String vmId); @Override void stopVm(String vmId); @Override void suspendVm(String vmId); @Override void resumeVm(String vmId); @Override List<ImageUploaded> getVmImages(); @Override String createVmImage(ImageToUpload imageToUpload); @Override ImageUploaded getVmImage(String imageId); @Override void deleteVmImage(String id); @Override void assignFloatingIp(String vmId); void deleteAllVmImages(); HostFake getHost(String hostname); void addHost(HostFake host); @Override Map<String, String> getFlavours(); @Override void resize(String vmId, VmRequirements vm); @Override void confirmResize(String vmId); @Override Map<String, HardwareInfo> getHypervisors(String region); @Override Host createHost(String hostname);  }