Blame view

tp_Test/src/ProgressionGeometriqueTest.java 495 Bytes
49443da5   Vincent Benoist   tp avance
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  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);
  
  	}
  }