[Bugfix] Partial fix for Swing Tests
-Changed default Motor Ignition event to AUTOMATIC -enabled swing-test path under intellij -fixed some simple compile errors in swing/test ... IntegrationTest
This commit is contained in:
		
							parent
							
								
									366cd6473f
								
							
						
					
					
						commit
						e36aee38d5
					
				| @ -26,7 +26,7 @@ public class MotorConfiguration implements FlightConfigurableParameter<MotorConf | |||||||
| 
 | 
 | ||||||
| 	protected boolean ignitionOveride = false; | 	protected boolean ignitionOveride = false; | ||||||
| 	protected double ignitionDelay = 0.0; | 	protected double ignitionDelay = 0.0; | ||||||
| 	protected IgnitionEvent ignitionEvent = IgnitionEvent.NEVER; | 	protected IgnitionEvent ignitionEvent = IgnitionEvent.AUTOMATIC; | ||||||
| 	 | 	 | ||||||
| 	protected int modID = 0; | 	protected int modID = 0; | ||||||
| 	 | 	 | ||||||
| @ -41,13 +41,7 @@ public class MotorConfiguration implements FlightConfigurableParameter<MotorConf | |||||||
| 		this.mount = _mount; | 		this.mount = _mount; | ||||||
| 		this.fcid = _fcid; | 		this.fcid = _fcid; | ||||||
| 		this.id = new MotorConfigurationId( _mount, _fcid ); | 		this.id = new MotorConfigurationId( _mount, _fcid ); | ||||||
| 		 |          | ||||||
| 		this.motor = null; |  | ||||||
| 		ejectionDelay = 0.0; |  | ||||||
| 		ignitionEvent = IgnitionEvent.NEVER; |  | ||||||
| 		ignitionDelay = 0.0; |  | ||||||
| 		 |  | ||||||
| 
 |  | ||||||
| 		modID++; | 		modID++; | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
|  | |||||||
| @ -29,6 +29,7 @@ | |||||||
|     <exclude-output /> |     <exclude-output /> | ||||||
|     <content url="file://$MODULE_DIR$"> |     <content url="file://$MODULE_DIR$"> | ||||||
|       <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> |       <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||||||
|  |       <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> | ||||||
|     </content> |     </content> | ||||||
|     <orderEntry type="sourceFolder" forTests="false" /> |     <orderEntry type="sourceFolder" forTests="false" /> | ||||||
|     <orderEntry type="inheritedJdk" /> |     <orderEntry type="inheritedJdk" /> | ||||||
| @ -206,5 +207,6 @@ | |||||||
|         <SOURCES /> |         <SOURCES /> | ||||||
|       </library> |       </library> | ||||||
|     </orderEntry> |     </orderEntry> | ||||||
|  |     <orderEntry type="library" name="junit-dep-4.8.2" level="project" /> | ||||||
|   </component> |   </component> | ||||||
| </module> | </module> | ||||||
| @ -28,17 +28,12 @@ import net.sf.openrocket.file.motor.GeneralMotorLoader; | |||||||
| import net.sf.openrocket.gui.main.UndoRedoAction; | import net.sf.openrocket.gui.main.UndoRedoAction; | ||||||
| import net.sf.openrocket.l10n.DebugTranslator; | import net.sf.openrocket.l10n.DebugTranslator; | ||||||
| import net.sf.openrocket.l10n.Translator; | import net.sf.openrocket.l10n.Translator; | ||||||
| import net.sf.openrocket.masscalc.BasicMassCalculator; |  | ||||||
| import net.sf.openrocket.masscalc.MassCalculator; | import net.sf.openrocket.masscalc.MassCalculator; | ||||||
| import net.sf.openrocket.masscalc.MassCalculator.MassCalcType; | import net.sf.openrocket.masscalc.MassCalculator.MassCalcType; | ||||||
| import net.sf.openrocket.motor.Motor; | import net.sf.openrocket.motor.Motor; | ||||||
| import net.sf.openrocket.motor.ThrustCurveMotor; | import net.sf.openrocket.motor.ThrustCurveMotor; | ||||||
| import net.sf.openrocket.plugin.PluginModule; | import net.sf.openrocket.plugin.PluginModule; | ||||||
| import net.sf.openrocket.rocketcomponent.Configuration; | import net.sf.openrocket.rocketcomponent.*; | ||||||
| import net.sf.openrocket.rocketcomponent.EngineBlock; |  | ||||||
| import net.sf.openrocket.rocketcomponent.MassComponent; |  | ||||||
| import net.sf.openrocket.rocketcomponent.NoseCone; |  | ||||||
| import net.sf.openrocket.rocketcomponent.RocketComponent; |  | ||||||
| import net.sf.openrocket.simulation.FlightDataType; | import net.sf.openrocket.simulation.FlightDataType; | ||||||
| import net.sf.openrocket.simulation.exception.SimulationException; | import net.sf.openrocket.simulation.exception.SimulationException; | ||||||
| import net.sf.openrocket.startup.Application; | import net.sf.openrocket.startup.Application; | ||||||
| @ -71,8 +66,8 @@ public class IntegrationTest { | |||||||
| 	private Action undoAction, redoAction; | 	private Action undoAction, redoAction; | ||||||
| 	 | 	 | ||||||
| 	private AerodynamicCalculator aeroCalc = new BarrowmanCalculator(); | 	private AerodynamicCalculator aeroCalc = new BarrowmanCalculator(); | ||||||
| 	private MassCalculator massCalc = new BasicMassCalculator(); | 	private MassCalculator massCalc = new MassCalculator(); | ||||||
| 	private Configuration config; | 	private FlightConfiguration config; | ||||||
| 	private FlightConditions conditions; | 	private FlightConditions conditions; | ||||||
| 	private String massComponentID = null; | 	private String massComponentID = null; | ||||||
| 	 | 	 | ||||||
| @ -113,7 +108,8 @@ public class IntegrationTest { | |||||||
| 		 | 		 | ||||||
| 		undoAction = UndoRedoAction.newUndoAction(document); | 		undoAction = UndoRedoAction.newUndoAction(document); | ||||||
| 		redoAction = UndoRedoAction.newRedoAction(document); | 		redoAction = UndoRedoAction.newRedoAction(document); | ||||||
| 		config = document.getSimulation(0).getConfiguration(); |         FlightConfigurationId fcid = document.getSimulation(0).getFlightConfigurationId(); | ||||||
|  | 		config = document.getRocket().getFlightConfiguration(fcid); | ||||||
| 		conditions = new FlightConditions(config); | 		conditions = new FlightConditions(config); | ||||||
| 		 | 		 | ||||||
| 		// Test undo state | 		// Test undo state | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user