public void LastAttemptFailsLongInput() { MasterMindGame masterMindTest = new MasterMindGame(6, 2); masterMindTest.SolveAttempt("11111"); Assert.IsTrue(masterMindTest.LastAttemptResults() == ""); }
public void LastAttemptCanWin() { MasterMindGame masterMindTest = new MasterMindGame(6, 2); masterMindTest.SolveAttempt(masterMindTest.CorrectNumbers); Assert.IsTrue(masterMindTest.LastAttemptResults() == "++++"); }
public void SolveAttemptLongEntry() { MasterMindGame masterMindTest = new MasterMindGame(6, 1); masterMindTest.SolveAttempt("12341"); Assert.IsTrue(masterMindTest.GoodEntry == false); }
public void SolveAttemptNotNumbers() { MasterMindGame masterMindTest = new MasterMindGame(1, 1); masterMindTest.SolveAttempt("ASDF"); Assert.IsTrue(masterMindTest.GoodEntry == false); }
public void SolveAttemptGoodEntry() { MasterMindGame masterMindTest = new MasterMindGame(1, 1); masterMindTest.SolveAttempt("1111"); Assert.IsTrue(masterMindTest.GoodEntry == true); }
public void LastAttemptFailsNotNumbers() { MasterMindGame masterMindTest = new MasterMindGame(6, 2); masterMindTest.SolveAttempt("ASDF"); Assert.IsTrue(masterMindTest.LastAttemptResults() == ""); }
public void LastAttemptFailsIncorrectRange() { MasterMindGame masterMindTest = new MasterMindGame(6, 2); masterMindTest.SolveAttempt("7777"); Assert.IsTrue(masterMindTest.LastAttemptResults() == ""); }
public void LastAttemptTwoIncorrecttPositionOneCorrect() { MasterMindGame masterMindTest = new MasterMindGame(6, 2); masterMindTest.SetCorrectNumbers("1234"); masterMindTest.SolveAttempt("3164"); Assert.IsTrue(masterMindTest.LastAttemptResults() == "+--"); }
public void LastAttemptThreeCorrectPosition() { MasterMindGame masterMindTest = new MasterMindGame(6, 2); masterMindTest.SetCorrectNumbers("1234"); masterMindTest.SolveAttempt("1233"); Assert.IsTrue(masterMindTest.LastAttemptResults() == "+++"); }
public void LastAttemptWrongPosition() { MasterMindGame masterMindTest = new MasterMindGame(6, 2); masterMindTest.SetCorrectNumbers("1234"); masterMindTest.SolveAttempt("4321"); Assert.IsTrue(masterMindTest.LastAttemptResults() == "----"); }
public void IncorrectRangeReturnsFalse() { MasterMindGame masterMindTest = new MasterMindGame(6, 2); Assert.IsFalse(masterMindTest.GoodAttempt("7777")); }
public void ShortInputReturnsFalse() { MasterMindGame masterMindTest = new MasterMindGame(6, 2); Assert.IsFalse(masterMindTest.GoodAttempt("12")); }
public void GoodAttemptReturnsTrue() { MasterMindGame masterMindTest = new MasterMindGame(6, 2); Assert.IsTrue(masterMindTest.GoodAttempt("1111")); }
public Form1() { MasterMindGame game = new MasterMindGame(20, 4); InitializeComponent(); }