@Test public void canBeAppliedReturnsTrueWhenPlanIsFeasible() { DeploymentPlan deploymentPlan = new DeploymentPlan(getAssignmentsList(new VmAssignmentToHost(vm1, host1), new VmAssignmentToHost(vm2, host2))); assertTrue(deploymentPlan.canBeApplied()); }
public boolean canBeApplied() { return allHostsHaveEnoughResourcesForTheirAssignations(); }
DeploymentPlan { public boolean canBeApplied() { return allHostsHaveEnoughResourcesForTheirAssignations(); } }
DeploymentPlan { public boolean canBeApplied() { return allHostsHaveEnoughResourcesForTheirAssignations(); } DeploymentPlan(List<VmAssignmentToHost> vmsAssignationsToHosts); }
DeploymentPlan { public boolean canBeApplied() { return allHostsHaveEnoughResourcesForTheirAssignations(); } DeploymentPlan(List<VmAssignmentToHost> vmsAssignationsToHosts); boolean canBeApplied(); List<Vm> getVmsAssignedToHost(String hostname); void addVmAssignmentToPlan(VmAssignmentToHost vmAssignmentToHost); List<VmAssignmentToHost> getVmsAssignationsToHosts(); @Override String toString(); }
DeploymentPlan { public boolean canBeApplied() { return allHostsHaveEnoughResourcesForTheirAssignations(); } DeploymentPlan(List<VmAssignmentToHost> vmsAssignationsToHosts); boolean canBeApplied(); List<Vm> getVmsAssignedToHost(String hostname); void addVmAssignmentToPlan(VmAssignmentToHost vmAssignmentToHost); List<VmAssignmentToHost> getVmsAssignationsToHosts(); @Override String toString();  }