De-localize Material and FlightDataType objects when persisting in ork files. Added...
[debian/openrocket] / core / test / net / sf / openrocket / preset / NoseConePresetTests.java
index f82b59189633116e2f14e1b8841a7d81b656d475..36743672ed4b24423e681ccc0c5d1bf05afe8f96 100644 (file)
@@ -26,7 +26,7 @@ public class NoseConePresetTests extends BaseTestCase {
                        presetspec.put(ComponentPreset.TYPE, ComponentPreset.Type.NOSE_CONE);
                        ComponentPresetFactory.create(presetspec);
                } catch ( InvalidComponentPresetException ex ) {
-                       PresetTest.assertInvalidPresetException( ex,
+                       PresetAssertHelper.assertInvalidPresetException( ex,
                                        new TypedKey<?>[] {
                                        ComponentPreset.MANUFACTURER, 
                                        ComponentPreset.PARTNO, 
@@ -53,7 +53,7 @@ public class NoseConePresetTests extends BaseTestCase {
                        presetspec.put( ComponentPreset.MANUFACTURER, Manufacturer.getManufacturer("manufacturer"));
                        ComponentPresetFactory.create(presetspec);
                } catch ( InvalidComponentPresetException ex ) {
-                       PresetTest.assertInvalidPresetException( ex,
+                       PresetAssertHelper.assertInvalidPresetException( ex,
                                        new TypedKey<?>[] {
                                        ComponentPreset.PARTNO, 
                                        ComponentPreset.LENGTH,
@@ -79,7 +79,7 @@ public class NoseConePresetTests extends BaseTestCase {
                        presetspec.put( ComponentPreset.PARTNO, "partno");
                        ComponentPresetFactory.create(presetspec);
                } catch ( InvalidComponentPresetException ex ) {
-                       PresetTest.assertInvalidPresetException( ex,
+                       PresetAssertHelper.assertInvalidPresetException( ex,
                                        new TypedKey<?>[] {
                                        ComponentPreset.LENGTH,
                                        ComponentPreset.AFT_OUTER_DIAMETER,
@@ -104,7 +104,7 @@ public class NoseConePresetTests extends BaseTestCase {
                        presetspec.put( ComponentPreset.LENGTH, 2.0);
                        ComponentPresetFactory.create(presetspec);
                } catch ( InvalidComponentPresetException ex ) {
-                       PresetTest.assertInvalidPresetException( ex,
+                       PresetAssertHelper.assertInvalidPresetException( ex,
                                        new TypedKey<?>[] {
                                        ComponentPreset.AFT_OUTER_DIAMETER,
                                        ComponentPreset.SHAPE
@@ -128,7 +128,7 @@ public class NoseConePresetTests extends BaseTestCase {
                        presetspec.put( ComponentPreset.SHAPE, Transition.Shape.CONICAL);
                        ComponentPresetFactory.create(presetspec);
                } catch ( InvalidComponentPresetException ex ) {
-                       PresetTest.assertInvalidPresetException( ex,
+                       PresetAssertHelper.assertInvalidPresetException( ex,
                                        new TypedKey<?>[] {
                                        ComponentPreset.AFT_OUTER_DIAMETER
                        },
@@ -172,7 +172,7 @@ public class NoseConePresetTests extends BaseTestCase {
                presetspec.put( ComponentPreset.LENGTH, 2.0);
                presetspec.put( ComponentPreset.SHAPE, Transition.Shape.CONICAL);
                presetspec.put( ComponentPreset.AFT_OUTER_DIAMETER, 2.0);
-               presetspec.put( ComponentPreset.MATERIAL, new Material.Bulk("test", 2.0, true));
+               presetspec.put( ComponentPreset.MATERIAL, Material.newUserMaterial(Material.Type.BULK,"test", 2.0));
                ComponentPreset preset = ComponentPresetFactory.create(presetspec);
 
                assertEquals("test",preset.get(ComponentPreset.MATERIAL).getName());
@@ -191,7 +191,7 @@ public class NoseConePresetTests extends BaseTestCase {
                presetspec.put( ComponentPreset.AFT_OUTER_DIAMETER, 2.0);
                presetspec.put( ComponentPreset.FILLED, true);
                presetspec.put( ComponentPreset.MASS, 100.0);
-               presetspec.put( ComponentPreset.MATERIAL, new Material.Bulk("test", 2.0, true));
+               presetspec.put( ComponentPreset.MATERIAL, Material.newUserMaterial(Material.Type.BULK,"test", 2.0));
                ComponentPreset preset = ComponentPresetFactory.create(presetspec);
 
                // constants put into the presetspec above.