@Test public void testApply() { Model mo = new DefaultModel(); Mapping map = mo.getMapping(); map.addOnlineNode(ns.get(0)); map.addOnlineNode(ns.get(1)); map.addReadyVM(vms.get(0)); map.addReadyVM(vms.get(2)); ModelView v = mock(ModelView.class); mo.attach(v); Assert.assertTrue(s.apply(mo)); verify(v).substituteVM(vms.get(0), vms.get(1)); }
@Override public boolean apply(Model m) { for (ModelView v : m.getViews()) { v.substituteVM(oldVm, newVm); } return true; }
SubstitutedVMEvent implements VMEvent { @Override public boolean apply(Model m) { for (ModelView v : m.getViews()) { v.substituteVM(oldVm, newVm); } return true; } }
SubstitutedVMEvent implements VMEvent { @Override public boolean apply(Model m) { for (ModelView v : m.getViews()) { v.substituteVM(oldVm, newVm); } return true; } SubstitutedVMEvent(VM vm, VM newVM); }
SubstitutedVMEvent implements VMEvent { @Override public boolean apply(Model m) { for (ModelView v : m.getViews()) { v.substituteVM(oldVm, newVm); } return true; } SubstitutedVMEvent(VM vm, VM newVM); @Override VM getVM(); VM getNewVM(); @Override boolean apply(Model m); @Override Object visit(ActionVisitor v); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
SubstitutedVMEvent implements VMEvent { @Override public boolean apply(Model m) { for (ModelView v : m.getViews()) { v.substituteVM(oldVm, newVm); } return true; } SubstitutedVMEvent(VM vm, VM newVM); @Override VM getVM(); VM getNewVM(); @Override boolean apply(Model m); @Override Object visit(ActionVisitor v); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }