|
@ -31,14 +31,14 @@ class GameManagerTest { |
|
|
// arrange |
|
|
// arrange |
|
|
|
|
|
|
|
|
GameManager gameManager = new GameManager(); |
|
|
GameManager gameManager = new GameManager(); |
|
|
gameManager.visualizer = new VisualizerPlainText(gameManager); |
|
|
|
|
|
VisualizerPlainText vpt = (VisualizerPlainText) gameManager.visualizer; |
|
|
|
|
|
|
|
|
gameManager.visualizer = new VisualizerPlainTextUltra(gameManager); |
|
|
|
|
|
VisualizerPlainTextUltra vptu = (VisualizerPlainTextUltra) gameManager.visualizer; |
|
|
|
|
|
|
|
|
// act |
|
|
// act |
|
|
|
|
|
|
|
|
String initialVptOutput = (String)vpt.GetOutput(); |
|
|
|
|
|
|
|
|
String initialVptOutput = (String)vptu.GetOutput(); |
|
|
gameManager.Update(); |
|
|
gameManager.Update(); |
|
|
String updatedVptOutput = (String)vpt.GetOutput(); |
|
|
|
|
|
|
|
|
String updatedVptOutput = (String)vptu.GetOutput(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// assert |
|
|
// assert |
|
|