import junit.framework.Test;
import junit.framework.TestSuite;
import net.sf.openrocket.aerodynamics.WarningSet;
-import net.sf.openrocket.database.Databases;
import net.sf.openrocket.file.simplesax.PlainTextHandler;
import net.sf.openrocket.material.Material;
import net.sf.openrocket.rocketcomponent.BodyTube;
* @throws Exception thrown if something goes awry
*/
public void testOpenElement() throws Exception {
- assertEquals(PlainTextHandler.INSTANCE, new RingHandler(new BodyTube()).openElement(null, null, null));
+ assertEquals(PlainTextHandler.INSTANCE, new RingHandler(new BodyTube(), new WarningSet()).openElement(null, null, null));
}
/**
public void testCloseElement() throws Exception {
BodyTube tube = new BodyTube();
- RingHandler handler = new RingHandler(tube);
+ RingHandler handler = new RingHandler(tube, new WarningSet());
CenteringRing component = (CenteringRing) getField(handler, "ring");
HashMap<String, String> attributes = new HashMap<String, String>();
WarningSet warnings = new WarningSet();
public void testConstructor() throws Exception {
try {
- new RingHandler(null);
+ new RingHandler(null, new WarningSet());
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException iae) {
}
BodyTube tube = new BodyTube();
- RingHandler handler = new RingHandler(tube);
+ RingHandler handler = new RingHandler(tube, new WarningSet());
CenteringRing component = (CenteringRing) getField(handler, "ring");
assertContains(component, tube.getChildren());
}
*/
public void testSetRelativePosition() throws Exception {
BodyTube tube = new BodyTube();
- RingHandler handler = new RingHandler(tube);
+ RingHandler handler = new RingHandler(tube, new WarningSet());
CenteringRing component = (CenteringRing) getField(handler, "ring");
handler.setRelativePosition(RocketComponent.Position.ABSOLUTE);
assertEquals(RocketComponent.Position.ABSOLUTE, component.getRelativePosition());
* @throws Exception thrown if something goes awry
*/
public void testGetComponent() throws Exception {
- assertTrue(new RingHandler(new BodyTube()).getComponent() instanceof CenteringRing);
+ assertTrue(new RingHandler(new BodyTube(), new WarningSet()).getComponent() instanceof CenteringRing);
}
/**
* @throws Exception thrown if something goes awry
*/
public void testGetMaterialType() throws Exception {
- assertEquals(Material.Type.BULK, new RingHandler(new BodyTube()).getMaterialType());
+ assertEquals(Material.Type.BULK, new RingHandler(new BodyTube(), new WarningSet()).getMaterialType());
}