Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package e2;
- import org.junit.jupiter.api.AfterEach;
- import org.junit.jupiter.api.BeforeAll;
- import org.junit.jupiter.api.BeforeEach;
- import org.junit.jupiter.api.Test;
- import java.util.ArrayList;
- import java.util.Arrays;
- import java.util.Iterator;
- import java.util.List;
- import static org.junit.jupiter.api.Assertions.*;
- class selectCandidatesTest {
- List<String> lista = new ArrayList<String>(Arrays.asList("1","2","3","4","5"));
- List<String> lista2 = new ArrayList<String>(Arrays.asList("1","2","3","4","5"));
- //Circular
- TVRealityList TV = new TVRealityList(lista, true);
- //Rebote
- TVRealityList TV2 = new TVRealityList(lista2, false);
- @Test
- void selectCandidates() {
- String resultadoCircular= "4";
- String resultadoRebote= "1";
- assertEquals(resultadoCircular,selectCandidates.selectCandidates(TV,3));
- assertEquals(resultadoRebote,selectCandidates.selectCandidates(TV2,3));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement