PraktikumHolonsTestConsoleController.java 791 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package tests;
  2. import org.junit.Before;
  3. import org.junit.Test;
  4. import ui.controller.ConsoleController;
  5. import ui.model.Model;
  6. import ui.view.Console;
  7. import java.awt.Color;
  8. /**
  9. * Tests for the ConsoleController.
  10. *
  11. * @author Gruppe14
  12. */
  13. public class PraktikumHolonsTestConsoleController {
  14. protected Model model;
  15. protected ConsoleController controller;
  16. /**
  17. * Setup.
  18. */
  19. @Before
  20. public void setUp() {
  21. model = new Model();
  22. model.setConsole(new Console());
  23. controller = new ConsoleController(model);
  24. }
  25. /**
  26. * Test for ConsoleController.
  27. */
  28. @Test
  29. public void testConsoleController() {
  30. controller.addTextToConsole("Hello World");
  31. controller.addTextToConsole("Hello World2!", new Color(255, 255, 255), 11, false, true, false);
  32. controller.clearConsole();
  33. }
  34. }