From: kruland2607 Date: Tue, 8 May 2012 18:13:52 +0000 (+0000) Subject: Renamed the PresetTest helper class to PresetAssertHelper. This keeps ant unittest... X-Git-Tag: upstream/12.09^2~292 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=d0ac8287a6e9548e2f1eb087d925fea12666660a;p=debian%2Fopenrocket Renamed the PresetTest helper class to PresetAssertHelper. This keeps ant unittest from carping about a *Test.java file which contains no tests. git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@655 180e2498-e6e9-4542-8430-84ac67f01cd8 --- diff --git a/core/test/net/sf/openrocket/preset/BodyTubePresetTests.java b/core/test/net/sf/openrocket/preset/BodyTubePresetTests.java index 9e4ddf0e..9d637985 100644 --- a/core/test/net/sf/openrocket/preset/BodyTubePresetTests.java +++ b/core/test/net/sf/openrocket/preset/BodyTubePresetTests.java @@ -24,7 +24,7 @@ public class BodyTubePresetTests { presetspec.put(ComponentPreset.TYPE, ComponentPreset.Type.BODY_TUBE); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.MANUFACTURER, ComponentPreset.PARTNO, @@ -48,7 +48,7 @@ public class BodyTubePresetTests { 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 BodyTubePresetTests { 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 BodyTubePresetTests { 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 BodyTubePresetTests { 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 BodyTubePresetTests { presetspec.put( ComponentPreset.THICKNESS, 2.0); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, null, new String[] { "Preset dimensions underspecified" diff --git a/core/test/net/sf/openrocket/preset/BulkHeadPresetTests.java b/core/test/net/sf/openrocket/preset/BulkHeadPresetTests.java index 0cbfd28c..ec2718fb 100644 --- a/core/test/net/sf/openrocket/preset/BulkHeadPresetTests.java +++ b/core/test/net/sf/openrocket/preset/BulkHeadPresetTests.java @@ -24,7 +24,7 @@ public class BulkHeadPresetTests { presetspec.put(ComponentPreset.TYPE, ComponentPreset.Type.BULK_HEAD); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.MANUFACTURER, ComponentPreset.PARTNO, @@ -49,7 +49,7 @@ public class BulkHeadPresetTests { 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, @@ -73,7 +73,7 @@ public class BulkHeadPresetTests { presetspec.put( ComponentPreset.PARTNO, "partno"); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.LENGTH, ComponentPreset.OUTER_DIAMETER @@ -96,7 +96,7 @@ public class BulkHeadPresetTests { presetspec.put( ComponentPreset.LENGTH, 2.0); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.OUTER_DIAMETER }, diff --git a/core/test/net/sf/openrocket/preset/CenteringRingPresetTests.java b/core/test/net/sf/openrocket/preset/CenteringRingPresetTests.java index 109d15e5..d378668c 100644 --- a/core/test/net/sf/openrocket/preset/CenteringRingPresetTests.java +++ b/core/test/net/sf/openrocket/preset/CenteringRingPresetTests.java @@ -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" diff --git a/core/test/net/sf/openrocket/preset/EngineBlockPresetTests.java b/core/test/net/sf/openrocket/preset/EngineBlockPresetTests.java index 0c6ebf01..420a22d7 100644 --- a/core/test/net/sf/openrocket/preset/EngineBlockPresetTests.java +++ b/core/test/net/sf/openrocket/preset/EngineBlockPresetTests.java @@ -24,7 +24,7 @@ public class EngineBlockPresetTests { presetspec.put(ComponentPreset.TYPE, ComponentPreset.Type.ENGINE_BLOCK); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.MANUFACTURER, ComponentPreset.PARTNO, @@ -48,7 +48,7 @@ public class EngineBlockPresetTests { 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 EngineBlockPresetTests { 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 EngineBlockPresetTests { 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 EngineBlockPresetTests { 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 EngineBlockPresetTests { presetspec.put( ComponentPreset.THICKNESS, 2.0); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, null, new String[] { "Preset dimensions underspecified" diff --git a/core/test/net/sf/openrocket/preset/LaunchLugPresetTests.java b/core/test/net/sf/openrocket/preset/LaunchLugPresetTests.java index d2707f03..42793a3e 100644 --- a/core/test/net/sf/openrocket/preset/LaunchLugPresetTests.java +++ b/core/test/net/sf/openrocket/preset/LaunchLugPresetTests.java @@ -24,7 +24,7 @@ public class LaunchLugPresetTests { presetspec.put(ComponentPreset.TYPE, ComponentPreset.Type.LAUNCH_LUG); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.MANUFACTURER, ComponentPreset.PARTNO, @@ -48,7 +48,7 @@ public class LaunchLugPresetTests { 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 LaunchLugPresetTests { 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 LaunchLugPresetTests { 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 LaunchLugPresetTests { 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 LaunchLugPresetTests { presetspec.put( ComponentPreset.THICKNESS, 2.0); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, null, new String[] { "Preset dimensions underspecified" diff --git a/core/test/net/sf/openrocket/preset/NoseConePresetTests.java b/core/test/net/sf/openrocket/preset/NoseConePresetTests.java index f82b5918..6a6368a2 100644 --- a/core/test/net/sf/openrocket/preset/NoseConePresetTests.java +++ b/core/test/net/sf/openrocket/preset/NoseConePresetTests.java @@ -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 }, diff --git a/core/test/net/sf/openrocket/preset/ParachutePresetTests.java b/core/test/net/sf/openrocket/preset/ParachutePresetTests.java index ad955699..e6b3110a 100644 --- a/core/test/net/sf/openrocket/preset/ParachutePresetTests.java +++ b/core/test/net/sf/openrocket/preset/ParachutePresetTests.java @@ -22,7 +22,7 @@ public class ParachutePresetTests { presetspec.put(ComponentPreset.TYPE, ComponentPreset.Type.PARACHUTE); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.MANUFACTURER, ComponentPreset.PARTNO, @@ -49,7 +49,7 @@ public class ParachutePresetTests { presetspec.put( ComponentPreset.MANUFACTURER, Manufacturer.getManufacturer("manufacturer")); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.PARTNO, ComponentPreset.DIAMETER, @@ -75,7 +75,7 @@ public class ParachutePresetTests { presetspec.put( ComponentPreset.PARTNO, "partno"); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.DIAMETER, ComponentPreset.LINE_COUNT, @@ -100,7 +100,7 @@ public class ParachutePresetTests { presetspec.put( ComponentPreset.DIAMETER, 2.0); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.LINE_COUNT, ComponentPreset.LINE_LENGTH @@ -124,7 +124,7 @@ public class ParachutePresetTests { presetspec.put( ComponentPreset.LINE_COUNT, 6); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.LINE_LENGTH }, diff --git a/core/test/net/sf/openrocket/preset/PresetAssertHelper.java b/core/test/net/sf/openrocket/preset/PresetAssertHelper.java new file mode 100644 index 00000000..84b7c03b --- /dev/null +++ b/core/test/net/sf/openrocket/preset/PresetAssertHelper.java @@ -0,0 +1,43 @@ +package net.sf.openrocket.preset; + +import static org.junit.Assert.*; + +public abstract class PresetAssertHelper { + + public static void assertInvalidPresetException( InvalidComponentPresetException exceptions, TypedKey[] keys, String[] messages ) { + if ( keys != null ) { + assertEquals( keys.length, exceptions.getInvalidParameters().size() ); + for( TypedKey expectedKey : keys ) { + boolean keyFound = false; + for( TypedKey k : exceptions.getInvalidParameters() ) { + if ( expectedKey == k ) { + keyFound = true; + break; + } + } + if ( ! keyFound ) { + fail( "Expected key " + expectedKey + " not in exception"); + } + } + } else { + assertEquals(0, exceptions.getInvalidParameters().size() ); + } + if ( messages != null ) { + assertEquals( messages.length, exceptions.getErrors().size() ); + for( String expectedMessage : messages ) { + boolean stringMatched = false; + for ( String s : exceptions.getErrors() ) { + if ( s.contains( expectedMessage ) ) { + stringMatched = true; + break; + } + } + if( !stringMatched ) { + fail( "Expected string \"" + expectedMessage + "\" not reported in errors"); + } + } + } else { + assertEquals(0, exceptions.getErrors().size() ); + } + } +} diff --git a/core/test/net/sf/openrocket/preset/PresetTest.java b/core/test/net/sf/openrocket/preset/PresetTest.java deleted file mode 100644 index ce42bb47..00000000 --- a/core/test/net/sf/openrocket/preset/PresetTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package net.sf.openrocket.preset; - -import static org.junit.Assert.*; - -public abstract class PresetTest { - - public static void assertInvalidPresetException( InvalidComponentPresetException exceptions, TypedKey[] keys, String[] messages ) { - if ( keys != null ) { - assertEquals( keys.length, exceptions.getInvalidParameters().size() ); - for( TypedKey expectedKey : keys ) { - boolean keyFound = false; - for( TypedKey k : exceptions.getInvalidParameters() ) { - if ( expectedKey == k ) { - keyFound = true; - break; - } - } - if ( ! keyFound ) { - fail( "Expected key " + expectedKey + " not in exception"); - } - } - } else { - assertEquals(0, exceptions.getInvalidParameters().size() ); - } - if ( messages != null ) { - assertEquals( messages.length, exceptions.getErrors().size() ); - for( String expectedMessage : messages ) { - boolean stringMatched = false; - for ( String s : exceptions.getErrors() ) { - if ( s.contains( expectedMessage ) ) { - stringMatched = true; - break; - } - } - if( !stringMatched ) { - fail( "Expected string \"" + expectedMessage + "\" not reported in errors"); - } - } - } else { - assertEquals(0, exceptions.getErrors().size() ); - } - } -} diff --git a/core/test/net/sf/openrocket/preset/StreamerPresetTests.java b/core/test/net/sf/openrocket/preset/StreamerPresetTests.java index df84a4f3..a16fd14c 100644 --- a/core/test/net/sf/openrocket/preset/StreamerPresetTests.java +++ b/core/test/net/sf/openrocket/preset/StreamerPresetTests.java @@ -22,7 +22,7 @@ public class StreamerPresetTests { presetspec.put(ComponentPreset.TYPE, ComponentPreset.Type.STREAMER); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.MANUFACTURER, ComponentPreset.PARTNO, @@ -47,7 +47,7 @@ public class StreamerPresetTests { 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 StreamerPresetTests { presetspec.put( ComponentPreset.PARTNO, "partno"); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.LENGTH, ComponentPreset.WIDTH @@ -94,7 +94,7 @@ public class StreamerPresetTests { presetspec.put( ComponentPreset.LENGTH, 2.0); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.WIDTH }, diff --git a/core/test/net/sf/openrocket/preset/TransitionPresetTests.java b/core/test/net/sf/openrocket/preset/TransitionPresetTests.java index 45d9a1e3..321e909e 100644 --- a/core/test/net/sf/openrocket/preset/TransitionPresetTests.java +++ b/core/test/net/sf/openrocket/preset/TransitionPresetTests.java @@ -26,7 +26,7 @@ public class TransitionPresetTests extends BaseTestCase { presetspec.put(ComponentPreset.TYPE, ComponentPreset.Type.TRANSITION); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.MANUFACTURER, ComponentPreset.PARTNO, @@ -53,7 +53,7 @@ public class TransitionPresetTests 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 TransitionPresetTests 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, @@ -105,7 +105,7 @@ public class TransitionPresetTests 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, ComponentPreset.FORE_OUTER_DIAMETER @@ -131,7 +131,7 @@ public class TransitionPresetTests extends BaseTestCase { presetspec.put( ComponentPreset.AFT_OUTER_DIAMETER, 2.0); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.FORE_OUTER_DIAMETER }, diff --git a/core/test/net/sf/openrocket/preset/TubeCouplerPresetTests.java b/core/test/net/sf/openrocket/preset/TubeCouplerPresetTests.java index 296958b5..90535a3b 100644 --- a/core/test/net/sf/openrocket/preset/TubeCouplerPresetTests.java +++ b/core/test/net/sf/openrocket/preset/TubeCouplerPresetTests.java @@ -24,7 +24,7 @@ public class TubeCouplerPresetTests { presetspec.put(ComponentPreset.TYPE, ComponentPreset.Type.TUBE_COUPLER); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, new TypedKey[] { ComponentPreset.MANUFACTURER, ComponentPreset.PARTNO, @@ -48,7 +48,7 @@ public class TubeCouplerPresetTests { 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 TubeCouplerPresetTests { 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 TubeCouplerPresetTests { 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 TubeCouplerPresetTests { 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 TubeCouplerPresetTests { presetspec.put( ComponentPreset.THICKNESS, 2.0); ComponentPresetFactory.create(presetspec); } catch ( InvalidComponentPresetException ex ) { - PresetTest.assertInvalidPresetException( ex, + PresetAssertHelper.assertInvalidPresetException( ex, null, new String[] { "Preset dimensions underspecified"