@Test public void testEquals() { DecadeDate date1 = new DecadeDate(mockSlot, 1, 1); DecadeDate date2 = new DecadeDate(mockSlot, 1, 1); assertEquals(date1, date2); assertEquals(date1.getCentury(), date2.getCentury()); assertEquals(date1.getDecade(), date2.getDecade()); assertEquals(date1.getSlot(), date2.getSlot()); assertEquals(date1.hashCode(), date2.hashCode()); assertEquals(date1.toString(), date2.toString()); }
@Override public boolean equals(Object o) { if (!super.equals(o)) return false; DecadeDate that = (DecadeDate) o; return century == that.century && decade == that.decade; }
DecadeDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; DecadeDate that = (DecadeDate) o; return century == that.century && decade == that.decade; } }
DecadeDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; DecadeDate that = (DecadeDate) o; return century == that.century && decade == that.decade; } DecadeDate(Slot slot, int century, int decade); }
DecadeDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; DecadeDate that = (DecadeDate) o; return century == that.century && decade == that.decade; } DecadeDate(Slot slot, int century, int decade); int getCentury(); int getDecade(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
DecadeDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; DecadeDate that = (DecadeDate) o; return century == that.century && decade == that.decade; } DecadeDate(Slot slot, int century, int decade); int getCentury(); int getDecade(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }