De-localize Material and FlightDataType objects when persisting in ork files. Added...
[debian/openrocket] / core / test / net / sf / openrocket / preset / NoseConeComponentTests.java
index 20c093ce18a7ca22d21bb5c50a089eea1741227f..e4a954e6da0c51e3085051d8bd6fc12b492f7faf 100644 (file)
@@ -37,7 +37,7 @@ public class NoseConeComponentTests extends BaseTestCase {
                presetspec.put( ComponentPreset.AFT_SHOULDER_DIAMETER, 1.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));
                preset = ComponentPresetFactory.create(presetspec);
        }
 
@@ -61,6 +61,7 @@ public class NoseConeComponentTests extends BaseTestCase {
                assertEquals( 0.0, nc.getForeShoulderRadius(), 0.0 );
                assertEquals( 1.0, nc.getAftShoulderLength(), 0.0 );
                assertEquals( 0.5, nc.getAftShoulderRadius(), 0.0 );
+               assertEquals( 0.5, nc.getAftShoulderThickness(), 0.0 );
 
                assertFalse( nc.isForeRadiusAutomatic() );
                assertFalse( nc.isAftRadiusAutomatic() );
@@ -154,7 +155,7 @@ public class NoseConeComponentTests extends BaseTestCase {
                
                nc.loadPreset(preset);
 
-               nc.setMaterial( new Material.Bulk("new", 1.0, true));
+               nc.setMaterial( Material.newUserMaterial(Material.Type.BULK,"new", 1.0));
                
                assertNull( nc.getPresetComponent() );
        }