@Test public void testEquals3() { System.out.println("equals"); Object obj = new Object(); Cell instance = new Cell(2,3,State.LIVE); boolean expResult=true; if(getClass()!=obj.getClass()){ expResult= false; } boolean result = instance.equals(obj); assertEquals(expResult, result); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Cell other = (Cell) obj; if (x != other.x) return false; if (y != other.y) return false; return true; }
Cell { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Cell other = (Cell) obj; if (x != other.x) return false; if (y != other.y) return false; return true; } }
Cell { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Cell other = (Cell) obj; if (x != other.x) return false; if (y != other.y) return false; return true; } Cell(int x,int y);  Cell(int x,int y,State state); }
Cell { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Cell other = (Cell) obj; if (x != other.x) return false; if (y != other.y) return false; return true; } Cell(int x,int y);  Cell(int x,int y,State state); int getX(); int getY(); State getState(); void setState(State state); @Override int hashCode(); @Override boolean equals(Object obj); Cell createCopy(); }
Cell { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Cell other = (Cell) obj; if (x != other.x) return false; if (y != other.y) return false; return true; } Cell(int x,int y);  Cell(int x,int y,State state); int getX(); int getY(); State getState(); void setState(State state); @Override int hashCode(); @Override boolean equals(Object obj); Cell createCopy();  }