De-localize Material and FlightDataType objects when persisting in ork files. Added...
[debian/openrocket] / core / test / net / sf / openrocket / preset / CenteringRingPresetTests.java
index 109d15e5e2a95c7546b4c0a202517f15fc766874..d106fefdb93f1fa54d1c6c20e0a168c3e67dae38 100644 (file)
@@ -24,7 +24,7 @@ public class CenteringRingPresetTests {
                        presetspec.put(ComponentPreset.TYPE, ComponentPreset.Type.CENTERING_RING);
                        ComponentPresetFactory.create(presetspec);
                } catch ( InvalidComponentPresetException ex ) {
-                       PresetTest.assertInvalidPresetException( ex,
+                       PresetAssertHelper.assertInvalidPresetException( ex,
                                        new TypedKey<?>[] {
                                        ComponentPreset.MANUFACTURER, 
                                        ComponentPreset.PARTNO, 
@@ -48,7 +48,7 @@ public class CenteringRingPresetTests {
                        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
@@ -71,7 +71,7 @@ public class CenteringRingPresetTests {
                        presetspec.put( ComponentPreset.PARTNO, "partno");
                        ComponentPresetFactory.create(presetspec);
                } catch ( InvalidComponentPresetException ex ) {
-                       PresetTest.assertInvalidPresetException( ex,
+                       PresetAssertHelper.assertInvalidPresetException( ex,
                                        new TypedKey<?>[] {
                                        ComponentPreset.LENGTH
                        },
@@ -94,7 +94,7 @@ public class CenteringRingPresetTests {
                        presetspec.put( ComponentPreset.OUTER_DIAMETER, 2.0);
                        ComponentPresetFactory.create(presetspec);
                } catch ( InvalidComponentPresetException ex ) {
-                       PresetTest.assertInvalidPresetException( ex,
+                       PresetAssertHelper.assertInvalidPresetException( ex,
                                        null,
                        new String[] {
                                        "Preset dimensions underspecified"
@@ -114,7 +114,7 @@ public class CenteringRingPresetTests {
                        presetspec.put( ComponentPreset.INNER_DIAMETER, 2.0);
                        ComponentPresetFactory.create(presetspec);
                } catch ( InvalidComponentPresetException ex ) {
-                       PresetTest.assertInvalidPresetException( ex,
+                       PresetAssertHelper.assertInvalidPresetException( ex,
                                        null,
                        new String[] {
                                        "Preset dimensions underspecified"
@@ -134,7 +134,7 @@ public class CenteringRingPresetTests {
                        presetspec.put( ComponentPreset.THICKNESS, 2.0);
                        ComponentPresetFactory.create(presetspec);
                } catch ( InvalidComponentPresetException ex ) {
-                       PresetTest.assertInvalidPresetException( ex,
+                       PresetAssertHelper.assertInvalidPresetException( ex,
                                        null,
                        new String[] {
                                        "Preset dimensions underspecified"
@@ -235,7 +235,7 @@ public class CenteringRingPresetTests {
                presetspec.put( ComponentPreset.LENGTH, 2.0);
                presetspec.put( ComponentPreset.OUTER_DIAMETER, 2.0);
                presetspec.put( ComponentPreset.INNER_DIAMETER, 1.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());
@@ -253,7 +253,7 @@ public class CenteringRingPresetTests {
                presetspec.put( ComponentPreset.OUTER_DIAMETER, 2.0);
                presetspec.put( ComponentPreset.INNER_DIAMETER, 1.0);
                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);
 
                // Compute the volume by hand here using a slightly different formula from