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.ExternalComponent;
public void testConstructor() throws Exception {
try {
- new TransitionHandler(null);
+ new TransitionHandler(null, new WarningSet());
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException iae) {
}
Stage stage = new Stage();
- TransitionHandler handler = new TransitionHandler(stage);
+ TransitionHandler handler = new TransitionHandler(stage, new WarningSet());
Transition component = (Transition) getField(handler, "transition");
assertContains(component, stage.getChildren());
}
* @throws Exception thrown if something goes awry
*/
public void testOpenElement() throws Exception {
- assertEquals(PlainTextHandler.INSTANCE, new TransitionHandler(new Stage()).openElement(null, null, null));
+ assertEquals(PlainTextHandler.INSTANCE, new TransitionHandler(new Stage(), new WarningSet()).openElement(null, null, null));
}
/**
HashMap<String, String> attributes = new HashMap<String, String>();
WarningSet warnings = new WarningSet();
- TransitionHandler handler = new TransitionHandler(stage);
+ TransitionHandler handler = new TransitionHandler(stage, new WarningSet());
Transition component = (Transition) getField(handler, "transition");
handler.closeElement("ShapeCode", attributes, "0", warnings);
* @throws Exception thrown if something goes awry
*/
public void testGetComponent() throws Exception {
- assertTrue(new TransitionHandler(new Stage()).getComponent() instanceof Transition);
+ assertTrue(new TransitionHandler(new Stage(), new WarningSet()).getComponent() instanceof Transition);
}
/**
* @throws Exception thrown if something goes awry
*/
public void testGetMaterialType() throws Exception {
- assertEquals(Material.Type.BULK, new TransitionHandler(new Stage()).getMaterialType());
+ assertEquals(Material.Type.BULK, new TransitionHandler(new Stage(), new WarningSet()).getMaterialType());
}