public void GetDirection_NegativeCases(string inputValue) { TextReader testTextReader = new StringReader(inputValue); var inputManager = new ConsoleInputManager(testTextReader); var directionValue = inputManager.GetDirection(); Assert.IsFalse(directionValue.HasValue); }
public void GetDirection_PositiveCases(string inputVal, PlayerDirection expectedDirection) { TextReader testTextReader = new StringReader(inputVal); var inputManager = new ConsoleInputManager(testTextReader); var directionValue = inputManager.GetDirection(); Assert.IsTrue(directionValue.HasValue); Assert.AreEqual(expectedDirection, directionValue.Value); }