public void testIterator() { Personas lista = new Personas(); Persona persona1 = PersonaTest.crearPersonaLatLngVariable(); Persona persona2 = PersonaTest.crearPersonaLatLngVariable(); Persona persona3 = PersonaTest.crearPersonaLatLngVariable(); lista.addPersona(persona1); lista.addPersona(persona2); lista.addPersona(persona3); Iterator<Persona> it = lista.iterator(); assertEquals(3, lista.size()); assertEquals(persona1, it.next()); assertEquals(persona2, it.next()); assertEquals(persona3, it.next()); }
public void testAddPersona() { Persona persona = PersonaTest.crearPersonaLatLngVariable(); Personas lista = new Personas(); lista.addPersona(persona); assertEquals(1, lista.size()); }