Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4366/src/net/sourceforge/bprocessor/model/test
Added Files:
PlaneTest.java
Log Message:
added tests for plane and added getI and getJ for plane
--- NEW FILE: PlaneTest.java ---
//---------------------------------------------------------------------------------
// $Id: PlaneTest.java,v 1.1 2006/07/12 14:34:17 rimestad Exp $
//
// Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net)
// Released under the Lesser GNU Public License v2.1
//---------------------------------------------------------------------------------
package net.sourceforge.bprocessor.model.test;
import net.sourceforge.bprocessor.model.Plane;
import net.sourceforge.bprocessor.model.Vertex;
import junit.framework.TestCase;
/**
* A test class for Plane
*/
public class PlaneTest extends TestCase {
/** the test plane */
private Plane p;
/**
* The setup routine
* @throws Exception exception
*/
protected void setUp() throws Exception {
super.setUp();
p = new Plane(new Vertex(1, 0, 0), new Vertex(0, 1, 0), new Vertex(5, 5, 5));
}
/**
* Test the getI method
*/
public void testI() {
Vertex v = p.getI().add(p.getOrigin());
assertTrue(p.contains(v));
}
/**
* Test the getI method
*/
public void testJ() {
assertTrue(p.contains(p.getJ().add(p.getOrigin())));
}
}
|