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