示例#1
0
 @Test
 public void whenInputIsInvalid_OutputErrorOutput() {
   _outputMock.setValidationResult(false);
   _gameStep.onInput("");
   _gameStep.onInput("Faulty Input");
   assertEquals("ErrorOutput", _textCommandHandler.getLastOutput());
 }
示例#2
0
 @Test
 public void transformsOutput() {
   _outputMock.setAppendInputToOutputWhenTransforming();
   _gameStep.onInput("TestInput");
   assertEquals("TestOutput TestInput", _textCommandHandler.getLastOutput());
 }
示例#3
0
 @Test
 public void whenInputIsValid_OutputNextOutput() {
   _gameStep.onInput("");
   _gameStep.onInput("Correct Input");
   assertEquals("SuccessOutput", _textCommandHandler.getLastOutput());
 }
示例#4
0
 @Test
 public void outputsOnInput() {
   _gameStep.onInput("Input");
   assertEquals("TestOutput", _textCommandHandler.getLastOutput());
 }