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