@Test(dependsOnMethods = {"testInstantiate"}) public void testEquals() { ShutdownVM a = new ShutdownVM(vms.get(0), ns.get(0), 3, 5); ShutdownVM b = new ShutdownVM(vms.get(0), ns.get(0), 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 ShutdownVM(vms.get(0), ns.get(0), 4, 5)); Assert.assertNotSame(a, new ShutdownVM(vms.get(0), ns.get(0), 3, 4)); Assert.assertNotSame(a, new ShutdownVM(vms.get(0), ns.get(1), 3, 5)); Assert.assertNotSame(a, new ShutdownVM(vms.get(1), ns.get(0), 4, 5)); }
@Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } ShutdownVM that = (ShutdownVM) o; return this.vm.equals(that.vm) && this.node.equals(that.node); }
ShutdownVM extends Action implements VMStateTransition { @Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } ShutdownVM that = (ShutdownVM) o; return this.vm.equals(that.vm) && this.node.equals(that.node); } }
ShutdownVM extends Action implements VMStateTransition { @Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } ShutdownVM that = (ShutdownVM) o; return this.vm.equals(that.vm) && this.node.equals(that.node); } ShutdownVM(VM v, Node on, int start, int end); }
ShutdownVM extends Action implements VMStateTransition { @Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } ShutdownVM that = (ShutdownVM) o; return this.vm.equals(that.vm) && this.node.equals(that.node); } ShutdownVM(VM v, Node on, int start, int end); @Override boolean applyAction(Model m); @Override String pretty(); @Override boolean equals(Object o); @Override int hashCode(); @Override VM getVM(); Node getNode(); @Override VMState getCurrentState(); @Override VMState getNextState(); @Override Object visit(ActionVisitor v); }
ShutdownVM extends Action implements VMStateTransition { @Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } ShutdownVM that = (ShutdownVM) o; return this.vm.equals(that.vm) && this.node.equals(that.node); } ShutdownVM(VM v, Node on, int start, int end); @Override boolean applyAction(Model m); @Override String pretty(); @Override boolean equals(Object o); @Override int hashCode(); @Override VM getVM(); Node getNode(); @Override VMState getCurrentState(); @Override VMState getNextState(); @Override Object visit(ActionVisitor v);  }