2019_2020:s2:td:td8
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 2019_2020:s2:td:td8 [2020/03/04 16:16] – [Questions] blay | 2019_2020:s2:td:td8 [2020/03/08 15:58] (current) – [De la modélisation au code : FINALE] blay | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| [[2019_2020: | [[2019_2020: | ||
| + | |||
| + | {{: | ||
| ===== La classe " | ===== La classe " | ||
| Line 204: | Line 206: | ||
| <code java> | <code java> | ||
| - | @Test | + | void testClosestPoint() throws InterruptedException { |
| - | void testClosestPoint() throws InterruptedException { | + | |
| Date currentDate1 = new Date(); | Date currentDate1 = new Date(); | ||
| - | DatedPoint currentPoint1 = new DatedPoint(5, | + | DatedPoint currentPoint1 = new DatedPoint(5, |
| Thread.sleep(1000); | Thread.sleep(1000); | ||
| Date currentDate2 = new Date(); | Date currentDate2 = new Date(); | ||
| - | DatedPoint currentPoint2 = new DatedPoint(7, | + | DatedPoint currentPoint2 = new DatedPoint(7, |
| Thread.sleep(1000); | Thread.sleep(1000); | ||
| - | DatedPoint currentPoint3 = new DatedPoint(10, | + | DatedPoint currentPoint3 = new DatedPoint(10, |
| Thread.sleep(1000); | Thread.sleep(1000); | ||
| - | Date currentDate3 = new Date(); | ||
| Journey path = new Journey(currentPoint1); | Journey path = new Journey(currentPoint1); | ||
| path.addPoint(currentPoint2); | path.addPoint(currentPoint2); | ||
| path.addPoint(currentPoint3); | path.addPoint(currentPoint3); | ||
| + | System.out.println(path); | ||
| assertEquals(currentPoint1.getDate(), | assertEquals(currentPoint1.getDate(), | ||
| assertEquals(currentPoint2.getDate(), | assertEquals(currentPoint2.getDate(), | ||
| assertEquals(currentPoint3.getDate(), | assertEquals(currentPoint3.getDate(), | ||
| - | assertEquals(currentPoint3.getDate(), | + | assertEquals(currentPoint3.getDate(), |
| - | assertEquals(currentPoint1.getDate(), | + | assertEquals(currentPoint1.getDate(), |
| - | assertEquals(currentPoint2.getDate(), | + | assertEquals(currentPoint2.getDate(), |
| } | } | ||
2019_2020/s2/td/td8.1583338587.txt.gz · Last modified: 2020/03/04 16:16 by blay