@Test(dependsOnMethods = {"testInstantiate"}) public void testEquals() { ResumeVM a = new ResumeVM(vms.get(0), ns.get(0), ns.get(1), 3, 5); ResumeVM b = new ResumeVM(vms.get(0), ns.get(0), ns.get(1), 3, 5); Assert.assertFalse(a.equals(new Object())); Assert.assertTrue(a.equals(a)); Assert.assertEquals(a, b); Assert.assertEquals(a.hashCode(), b.hashCode()); Assert.assertNotSame(a, new ResumeVM(vms.get(0), ns.get(0), ns.get(1), 4, 5)); Assert.assertNotSame(a, new ResumeVM(vms.get(0), ns.get(0), ns.get(1), 3, 4)); Assert.assertNotSame(a, new ResumeVM(vms.get(1), ns.get(0), ns.get(1), 3, 5)); Assert.assertNotSame(a, new ResumeVM(vms.get(0), ns.get(2), ns.get(1), 3, 5)); Assert.assertNotSame(a, new ResumeVM(vms.get(0), ns.get(0), ns.get(2), 3, 5)); }
@Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } ResumeVM that = (ResumeVM) o; return this.vm.equals(that.vm) && this.src.equals(that.src) && this.dst.equals(that.dst); }
ResumeVM extends Action implements VMStateTransition, RunningVMPlacement { @Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } ResumeVM that = (ResumeVM) o; return this.vm.equals(that.vm) && this.src.equals(that.src) && this.dst.equals(that.dst); } }
ResumeVM extends Action implements VMStateTransition, RunningVMPlacement { @Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } ResumeVM that = (ResumeVM) o; return this.vm.equals(that.vm) && this.src.equals(that.src) && this.dst.equals(that.dst); } ResumeVM(VM v, Node from, Node to, int start, int end); }
ResumeVM extends Action implements VMStateTransition, RunningVMPlacement { @Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } ResumeVM that = (ResumeVM) o; return this.vm.equals(that.vm) && this.src.equals(that.src) && this.dst.equals(that.dst); } ResumeVM(VM v, Node from, Node to, int start, int end); @Override VM getVM(); @Override Node getDestinationNode(); Node getSourceNode(); @Override String pretty(); @Override boolean applyAction(Model m); @Override boolean equals(Object o); @Override int hashCode(); @Override VMState getCurrentState(); @Override VMState getNextState(); @Override Object visit(ActionVisitor v); }
ResumeVM extends Action implements VMStateTransition, RunningVMPlacement { @Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } ResumeVM that = (ResumeVM) o; return this.vm.equals(that.vm) && this.src.equals(that.src) && this.dst.equals(that.dst); } ResumeVM(VM v, Node from, Node to, int start, int end); @Override VM getVM(); @Override Node getDestinationNode(); Node getSourceNode(); @Override String pretty(); @Override boolean applyAction(Model m); @Override boolean equals(Object o); @Override int hashCode(); @Override VMState getCurrentState(); @Override VMState getNextState(); @Override Object visit(ActionVisitor v);  }