Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1.  
  2. import static org.junit.Assert.*;
  3. import org.junit.Test;
  4.  
  5. public class contarColumnasConCerosTest {
  6.  
  7. @Test
  8. public void contarColumnasConCeros() {
  9.  
  10. contarColumnasConCeros gonza = new contarColumnasConCeros();
  11. double matriz[][] = new double[6][6];
  12.  
  13. matriz[0][0] = 1;
  14. matriz[0][1] = 1;
  15. matriz[0][2] = 1;
  16. matriz[0][3] = 1;
  17. matriz[0][4] = 1;
  18. matriz[0][5] = 1;
  19. matriz[2][0] = 1;
  20. matriz[2][1] = 1;
  21. matriz[2][2] = 1;
  22. matriz[2][3] = 1;
  23. matriz[2][4] = 1;
  24. matriz[2][5] = 1;
  25.  
  26.  
  27. assertEquals(4, gonza.contarColumnas(matriz));
  28. }
  29.  
  30. @Test
  31. public void contarColumnasConCeros2() {
  32.  
  33. contarColumnasConCeros gonza = new contarColumnasConCeros();
  34. double matriz[][] = new double[6][6];
  35.  
  36. matriz[0][0] = 1;
  37. matriz[0][1] = 1;
  38. matriz[0][2] = 1;
  39. matriz[0][3] = 1;
  40.  
  41. assertEquals(6, gonza.contarColumnas(matriz));
  42. }
  43.  
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement