@Test public void testReveal() { // TODO: test for setRevealed() return value? assertFalse("Square should not be revealed by default", s.isRevealed()); s.setRevealed(true); assertTrue("Square should be revealed after calling setRevealed", s.isRevealed()); }
@Test public void testObservable() { TestObserver observer = new TestObserver(); s.addObserver(observer); s.setRevealed(true); assertTrue("Square should update observers after revealing", observer.updated); }