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