public void score_notifies_observers_hard() { diffCtxt = new DifficultyContext(score); score.register(diffCtxt); score.gainScore(diffCtxt.HardThreshold + 10); Assert.IsInstanceOfType(diffCtxt.getState(), typeof(HardState)); }
public void score_notifies_observers_easy() { diffCtxt = new DifficultyContext(score); score.register(diffCtxt); score.gainScore(10); Assert.IsInstanceOfType(diffCtxt.getState(), typeof(EasyState)); }
public void difficultyState_update_hard() { diffCtxt = new DifficultyContext(score); score.ScoreVal += diffCtxt.HardThreshold + 10; diffCtxt.update(); Assert.IsInstanceOfType(diffCtxt.getState(), typeof(HardState)); }
public void score_registers_osbservers() { diffCtxt = new DifficultyContext(score); int initialLength = score.ObserverList.Count; score.register(diffCtxt); Assert.AreEqual(initialLength + 1, score.ObserverList.Count); }
public void difficultyState_update_easy() { diffCtxt = new DifficultyContext(score); diffCtxt.update(); Assert.IsInstanceOfType(diffCtxt.getState(), typeof(EasyState)); }