ProgressionGeometriqueTest.java
495 Bytes
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class ProgressionGeometriqueTest {
@Test
public void testConstructeur() {
ProgressionGeometrique pg = new ProgressionGeometrique(10, 5);
assertEquals(pg.termes.size(), 1);
}
@Test
public void testNext() {
ProgressionGeometrique pg = new ProgressionGeometrique(10, 5);
assertEquals(pg.termes.size(), 1);
pg.next();
assertEquals(pg.termes.size(), 2);
assertEquals(pg.getTerme(), 50, 0);
}
}