@Test public void getVmsEnergyModFromVmsReturnsEmptyWhenItReceivesAnEmptyList() { assertTrue(VMMToEMConversor.getVmsEnergyModFromVms(new ArrayList<Vm>()).isEmpty()); }
public static List<VM> getVmsEnergyModFromVms(List<Vm> vms) { List<VM> result = new ArrayList<>(); for (Vm vm: vms) { VM emVM = EnergyModeller.getVM(vm.getCpus(), vm.getRamMb(), vm.getDiskGb()); emVM.addDiskImage(vm.getImage()); emVM.addApplicationTag(vm.getApplicationId()); result.add(emVM); } return result; }
VMMToEMConversor { public static List<VM> getVmsEnergyModFromVms(List<Vm> vms) { List<VM> result = new ArrayList<>(); for (Vm vm: vms) { VM emVM = EnergyModeller.getVM(vm.getCpus(), vm.getRamMb(), vm.getDiskGb()); emVM.addDiskImage(vm.getImage()); emVM.addApplicationTag(vm.getApplicationId()); result.add(emVM); } return result; } }
VMMToEMConversor { public static List<VM> getVmsEnergyModFromVms(List<Vm> vms) { List<VM> result = new ArrayList<>(); for (Vm vm: vms) { VM emVM = EnergyModeller.getVM(vm.getCpus(), vm.getRamMb(), vm.getDiskGb()); emVM.addDiskImage(vm.getImage()); emVM.addApplicationTag(vm.getApplicationId()); result.add(emVM); } return result; } private  VMMToEMConversor(); }
VMMToEMConversor { public static List<VM> getVmsEnergyModFromVms(List<Vm> vms) { List<VM> result = new ArrayList<>(); for (Vm vm: vms) { VM emVM = EnergyModeller.getVM(vm.getCpus(), vm.getRamMb(), vm.getDiskGb()); emVM.addDiskImage(vm.getImage()); emVM.addApplicationTag(vm.getApplicationId()); result.add(emVM); } return result; } private  VMMToEMConversor(); static List<VM> getVmsEnergyModFromVms(List<Vm> vms); }
VMMToEMConversor { public static List<VM> getVmsEnergyModFromVms(List<Vm> vms) { List<VM> result = new ArrayList<>(); for (Vm vm: vms) { VM emVM = EnergyModeller.getVM(vm.getCpus(), vm.getRamMb(), vm.getDiskGb()); emVM.addDiskImage(vm.getImage()); emVM.addApplicationTag(vm.getApplicationId()); result.add(emVM); } return result; } private  VMMToEMConversor(); static List<VM> getVmsEnergyModFromVms(List<Vm> vms);  }