X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=test%2Fnet%2Fsf%2Fopenrocket%2Ffile%2Frocksim%2FBodyTubeHandlerTest.java;h=8cbd6f783171ba56848c0aa78678991e09bef9f8;hb=c55a6518fb749ae7131948b6c91001275f7c56fe;hp=061c8994db49c08201c5ce81055202cb711bcc6a;hpb=198227dc14b96901f3105fd816b6a9b84993adef;p=debian%2Fopenrocket diff --git a/test/net/sf/openrocket/file/rocksim/BodyTubeHandlerTest.java b/test/net/sf/openrocket/file/rocksim/BodyTubeHandlerTest.java index 061c8994..8cbd6f78 100644 --- a/test/net/sf/openrocket/file/rocksim/BodyTubeHandlerTest.java +++ b/test/net/sf/openrocket/file/rocksim/BodyTubeHandlerTest.java @@ -6,12 +6,11 @@ package net.sf.openrocket.file.rocksim; 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; -import net.sf.openrocket.rocketcomponent.Stage; import net.sf.openrocket.rocketcomponent.ExternalComponent; +import net.sf.openrocket.rocketcomponent.Stage; import java.util.HashMap; @@ -19,7 +18,7 @@ import java.util.HashMap; * BodyTubeHandler Tester. * */ -public class BodyTubeHandlerTest extends BaseRocksimTest { +public class BodyTubeHandlerTest extends RocksimTestBase { /** * The class under test. @@ -72,7 +71,7 @@ public class BodyTubeHandlerTest extends BaseRocksimTest { public void testConstructor() throws Exception { try { - new BodyTubeHandler(null); + new BodyTubeHandler(null, new WarningSet()); fail("Should have thrown IllegalArgumentException"); } catch (IllegalArgumentException iae) { @@ -80,7 +79,7 @@ public class BodyTubeHandlerTest extends BaseRocksimTest { } Stage stage = new Stage(); - BodyTubeHandler handler = new BodyTubeHandler(stage); + BodyTubeHandler handler = new BodyTubeHandler(stage, new WarningSet()); BodyTube component = (BodyTube) getField(handler, "bodyTube"); assertContains(component, stage.getChildren()); } @@ -91,8 +90,8 @@ public class BodyTubeHandlerTest extends BaseRocksimTest { * @throws Exception thrown if something goes awry */ public void testOpenElement() throws Exception { - assertEquals(PlainTextHandler.INSTANCE, new BodyTubeHandler(new Stage()).openElement(null, null, null)); - assertNotNull(new BodyTubeHandler(new Stage()).openElement("AttachedParts", null, null)); + assertEquals(PlainTextHandler.INSTANCE, new BodyTubeHandler(new Stage(), new WarningSet()).openElement(null, null, null)); + assertNotNull(new BodyTubeHandler(new Stage(), new WarningSet()).openElement("AttachedParts", null, null)); } /** @@ -103,7 +102,7 @@ public class BodyTubeHandlerTest extends BaseRocksimTest { */ public void testCloseElement() throws Exception { Stage stage = new Stage(); - BodyTubeHandler handler = new BodyTubeHandler(stage); + BodyTubeHandler handler = new BodyTubeHandler(stage, new WarningSet()); BodyTube component = (BodyTube) getField(handler, "bodyTube"); HashMap attributes = new HashMap(); WarningSet warnings = new WarningSet(); @@ -173,7 +172,7 @@ public class BodyTubeHandlerTest extends BaseRocksimTest { * @throws Exception thrown if something goes awry */ public void testGetComponent() throws Exception { - assertTrue(new BodyTubeHandler(new Stage()).getComponent() instanceof BodyTube); + assertTrue(new BodyTubeHandler(new Stage(), new WarningSet()).getComponent() instanceof BodyTube); } /** @@ -182,7 +181,7 @@ public class BodyTubeHandlerTest extends BaseRocksimTest { * @throws Exception thrown if something goes awry */ public void testGetMaterialType() throws Exception { - assertEquals(Material.Type.BULK, new BodyTubeHandler(new Stage()).getMaterialType()); + assertEquals(Material.Type.BULK, new BodyTubeHandler(new Stage(), new WarningSet()).getMaterialType()); } }