Advertisement
techno-

selectCandidatesTest

Nov 4th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. package e2;
  2.  
  3. import org.junit.jupiter.api.AfterEach;
  4. import org.junit.jupiter.api.BeforeAll;
  5. import org.junit.jupiter.api.BeforeEach;
  6. import org.junit.jupiter.api.Test;
  7.  
  8. import java.util.ArrayList;
  9. import java.util.Arrays;
  10. import java.util.Iterator;
  11. import java.util.List;
  12.  
  13. import static org.junit.jupiter.api.Assertions.*;
  14.  
  15. class selectCandidatesTest {
  16.  
  17.     List<String> lista = new ArrayList<String>(Arrays.asList("1","2","3","4","5"));
  18.     List<String> lista2 = new ArrayList<String>(Arrays.asList("1","2","3","4","5"));
  19.  
  20.     //Circular
  21.     TVRealityList TV = new TVRealityList(lista, true);
  22.     //Rebote
  23.     TVRealityList TV2 = new TVRealityList(lista2, false);
  24.  
  25.     @Test
  26.     void selectCandidates() {
  27.         String resultadoCircular= "4";
  28.         String resultadoRebote= "1";
  29.  
  30.         assertEquals(resultadoCircular,selectCandidates.selectCandidates(TV,3));
  31.         assertEquals(resultadoRebote,selectCandidates.selectCandidates(TV2,3));
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement