public void doesWrongAnswerGameLogicWork() { string[] text = Win1Logic.populate().Split('-'); string firstNum = text[0]; string secNum = text[1]; bool wrongAnswer = Win1Logic.UpdateScoreLogic(firstNum, firstNum, secNum); Assert.AreEqual(wrongAnswer, false); }
public void doesExceptionHandlerGameLogicWork() { string[] text = Win1Logic.populate().Split('-'); string ExceptionString = "I don't know the answer!"; string firstNum = text[0]; string secNum = text[1]; bool ExceptionShouldReturnFalse = Win1Logic.UpdateScoreLogic(ExceptionString, firstNum, secNum); Assert.AreEqual(ExceptionShouldReturnFalse, false); }
public void doesRightAnswerGameLogicWork() { string[] text = Win1Logic.populate().Split('-'); int firstNumInt = Int32.Parse(text[0]); int secNumInt = Int32.Parse(text[1]); int answer = firstNumInt * secNumInt; string answerString = answer.ToString(); string firstNum = text[0]; string secNum = text[1]; bool rightAnswer = Win1Logic.UpdateScoreLogic(answerString, firstNum, secNum); Assert.AreEqual(rightAnswer, true); }