Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package e1;
- 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 static org.junit.jupiter.api.Assertions.*;
- class PeliculaTest {
- private static Pelicula p1;
- @BeforeAll
- static void meterDatos() {
- p1 = new Pelicula("Minions", 1500000.0f);
- Especialista esp = new Especialista("Carlo", "Ancelotti", "77777777A", 666666666, "italiano", true, 50);
- Interprete inter = new Interprete("Fede", "Valverde", "77777777A", 666666666, "uruguayo", true, 40);
- Interprete inter2 = new Interprete("Luka", "Modric", "77777777A", 666666666, "croata", false, 60);
- Doblador dob = new Doblador("Tony", "Kroos", "77777891A", 666666666, "alemán", 50);
- Director dir = new Director("Karim", "Benzema", "77777777A", 666666666, "francés", 13, 100);
- Productores prod = new Productores("Rodrygo", "Goes", "77777777A", 666666666, "brasileño", 80);
- Musico mus = new Musico("Vinicius", "Junior", "77777777A", 666666666, "brasileño", 90);
- Guionista gui = new Guionista("Marco", "Asensio", "77777777A", 666666666, "español", true, 70);
- p1.insertarHumano(esp);
- p1.insertarHumano(inter);
- p1.insertarHumano(inter2);
- p1.insertarHumano(dob);
- p1.insertarHumano(dir);
- p1.insertarHumano(prod);
- p1.insertarHumano(mus);
- p1.insertarHumano(gui);
- }
- @Test
- void printSalaries() {
- String texto="\nCarlo Ancelotti (Stunt performer with extra for danger): 3000.0 euro\n" +
- "Fede Valverde (Actor protagonist): 24000.0 euro\n" +
- "Luka Modric (Actor secondary): 12000.0 euro\n" +
- "Tony Kroos (Dubber): 1000.0 euro\n" +
- "Karim Benzema (Director, 13 years of experiencie): 23000.0 euro\n" +
- "Rodrygo Goes (Producer): 7200.0 euro\n" +
- "Vinicius Junior (Musician): 5400.0 euro\n" +
- "Marco Asensio (Screenwriter, original screenplay): 8900.0 euro\n" +
- "The total payroll for Minions is 84500.0 euro";
- assertEquals(texto,p1.printSalaries());
- }
- @Test
- void printRoyalties() {
- String texto="\nKarim Benzema (Director): 75000.0\n" +
- "Rodrygo Goes (Producer): 30000.0\n" +
- "Vinicius Junior (Musician): 60000.0\n" +
- "Marco Asensio (Screenwriter): 75000.0";
- assertEquals(texto,p1.printRoyalties());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement