public void DontRememberNextStateTest() { WordAutomat w = new WordAutomat(); w.word = WordEngine.GetWord(); DontRemember s = new DontRemember(w); s.NextState(StateMsg.yes); Assert.IsTrue(Object.ReferenceEquals(w.state.GetType(), (new SelectWord(w)).GetType())); s.NextState(StateMsg.no); Assert.IsTrue(Object.ReferenceEquals(w.state.GetType(), (new SelectWord(w)).GetType())); }
public void DontRemeberStateTest() { WordAutomat w = new WordAutomat(); w.word = WordEngine.GetWord(); AppSettings.SetSound(false); DontRemember s = new DontRemember(w); WordState st = s.GetState(); Assert.AreEqual(false, st.B1); Assert.AreEqual(true, st.B2); Assert.AreEqual("", st.Button1); Assert.AreEqual("Далее", st.Button2); Assert.AreEqual(true, st.E); Assert.AreEqual(true, st.R); Assert.AreEqual(true, st.S); }