package org.geolab3d.test;
import org.geolab3d.geometry.Point;
import org.junit.Test;
import junit.framework.TestCase;
public class PointTest extends TestCase {
public PointTest(String name) {
super(name);
}
protected void setUp() throws Exception {
super.setUp();
}
protected void tearDown() throws Exception {
super.tearDown();
}
@Test
public void testGetX() {
Point p = new Point(1.,2.,3.);
assertEquals(1.0, p.getX(), 0);
}
@Test
public void testGetY() {
Point p = new Point(1.,2.,3.);
assertEquals(2.0, p.getY(), 0);
}
@Test
public void testGetZ() {
Point p = new Point(1.,2.,3.);
assertEquals(3.0, p.getZ(), 0);
}
@Test
public void testMoveX(){
Point p = new Point (1.,2.,3.);
double dx = 1.;
assertEquals(2., p.getX() + dx, 0);
}
@Test
public void testMoveY(){
Point p = new Point (1.,2.,3.);
double dy = 1.;
assertEquals(3., p.getY() + dy, 0);
}
@Test
public void testMoveZ(){
Point p = new Point (1.,2.,3.);
double dz = 1.;
assertEquals(4., p.getZ() + dz, 0);
}
}