public void testRemoveNextHatchedIfAvailable() { qi.incubate(a); qi.incubate(b); qi.incubate(c); assertNull(qi.removeNextHatchedIfAvailable()); qi.hatch(c); assertNull(qi.removeNextHatchedIfAvailable()); qi.hatch(b); assertNull(qi.removeNextHatchedIfAvailable()); qi.hatch(a); assertEquals(a, qi.removeNextHatchedIfAvailable()); assertEquals(b, qi.removeNextHatchedIfAvailable()); assertEquals(c, qi.removeNextHatchedIfAvailable()); }
public void testNextIsHatched() { assertEquals(false, qi.nextIsHatched()); qi.incubate(a); assertEquals(false, qi.nextIsHatched()); qi.hatch(a); assertEquals(true, qi.nextIsHatched()); qi.removeNextHatchedIfAvailable(); assertEquals(false, qi.nextIsHatched()); }