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 SolveAttemptNotNumbers() { MasterMindGame masterMindTest = new MasterMindGame(1, 1); masterMindTest.SolveAttempt("ASDF"); Assert.IsTrue(masterMindTest.GoodEntry == false); }
public void SolveAttemptLongEntry() { MasterMindGame masterMindTest = new MasterMindGame(6, 1); masterMindTest.SolveAttempt("12341"); 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() == "----"); }