PointNommeTest.java
01 package fr.isae.geometry;
02 
03 import org.junit.*;
04 import static org.junit.Assert.*;
05 
06 /**
07  * Unit Test for class PointNomme.
08  *
09  *
10  * Created: Tue Oct 31 13:05:14 2006
11  *
12  @author <a href="mailto:garion@isae.fr">Christophe Garion</a>
13  @version 1.0
14  */
15 public class PointNommeTest extends PointTest {
16 
17     private PointNomme pn;
18 
19     /**
20      * Setup for the tests.
21      */
22     @Before public void setUp() {
23         super.setUp();
24         this.pn = new PointNomme(2.0, -4.0"Point nomme");
25     }
26 
27     protected Point createPoint(double x, double y) {
28         return new PointNomme(x, y, "Point nomme");
29     }
30 
31     @Test public void testToString() {
32         assertEquals("Point nomme:(2.0,-4.0)", pn.toString());
33     }
34 
35     @Test public void testEqualsSupp() {
36         Point p = new Point(1.02.0);
37         PointNomme pn = new PointNomme(1.02.0"A");
38 
39         assertTrue(p.equals(pn));
40         assertFalse(pn.equals(p));
41     }
42 }