Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package ejercicio3;
  7.  
  8. import org.junit.After;
  9. import org.junit.AfterClass;
  10. import org.junit.Before;
  11. import org.junit.BeforeClass;
  12. import org.junit.Test;
  13. import static org.junit.Assert.*;
  14.  
  15. /**
  16. *
  17. * @author lois
  18. */
  19. public class TorneoTest {
  20.  
  21. public TorneoTest() {
  22. }
  23.  
  24. @BeforeClass
  25. public static void setUpClass() {
  26. }
  27.  
  28. @AfterClass
  29. public static void tearDownClass() {
  30. }
  31.  
  32. @Before
  33. public void setUp() {
  34. }
  35.  
  36. @After
  37. public void tearDown() {
  38. }
  39.  
  40. /**
  41. * Test of setName method, of class Torneo.
  42. */
  43. @Test
  44. public void testSetName() {
  45. System.out.println("setName");
  46. String s = "TorneoMixtoFIC";
  47. ElimDirecta instance = new ElimDirecta("TorneoMixtoFIC");
  48. instance.setName(s);
  49. // TODO review the generated test code and remove the default call to fail.
  50. }
  51.  
  52. /**
  53. * Test of getName method, of class Torneo.
  54. */
  55. @Test
  56. public void testGetName() {
  57. System.out.println("getName");
  58. ElimDirecta instance = new ElimDirecta("TorneoMixtoFIC");
  59. String expResult = "TorneoMixtoFIC";
  60. String result = instance.getName();
  61. assertEquals(expResult, result);
  62. // TODO review the generated test code and remove the default call to fail.
  63. }
  64.  
  65. /**
  66. * Test of inscribirTorneo method, of class Torneo.
  67. */
  68. @Test(expected = IllegalArgumentException.class)
  69. public void testInscribirTorneo() {
  70. System.out.println("inscribirTorneo");
  71. String nuevoequipo = "Aranjuez";
  72. ElimDirecta instance = new ElimDirecta("TorneoMixtoFIC");
  73. instance.inscribirTorneo(nuevoequipo);
  74. instance.inscribirTorneo("Celta");
  75. instance.inscribirTorneo("Celta");
  76. // TODO review the generated test code and remove the default call to fail
  77. }
  78.  
  79. @Test
  80. public void testInscribirTorneo1() {
  81. System.out.println("inscribirTorneo");
  82. ElimDirecta instance = new ElimDirecta("TorneoElimFIC");
  83. instance.inscribirTorneo("e1");
  84. instance.inscribirTorneo("e2");
  85. instance.inscribirTorneo("e3");
  86. instance.inscribirTorneo("e4");
  87. instance.inscribirTorneo("e5");
  88. // TODO review the generated test code and remove the default call to fail
  89. }
  90.  
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement