@Test public void testEquals() { WeekDate date1 = new WeekDate(mockSlot, 1, 1); WeekDate date2 = new WeekDate(mockSlot, 1, 1); assertEquals(date1, date2); assertEquals(date1.getWeek(), date2.getWeek()); assertEquals(date1.getYear(), date2.getYear()); 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; WeekDate weekDate = (WeekDate) o; return year == weekDate.year && week == weekDate.week; }
WeekDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; WeekDate weekDate = (WeekDate) o; return year == weekDate.year && week == weekDate.week; } }
WeekDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; WeekDate weekDate = (WeekDate) o; return year == weekDate.year && week == weekDate.week; } WeekDate(Slot slot, int year, int week); }
WeekDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; WeekDate weekDate = (WeekDate) o; return year == weekDate.year && week == weekDate.week; } WeekDate(Slot slot, int year, int week); int getYear(); int getWeek(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
WeekDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; WeekDate weekDate = (WeekDate) o; return year == weekDate.year && week == weekDate.week; } WeekDate(Slot slot, int year, int week); int getYear(); int getWeek(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }