/** * Main entry point for the simulator. * * @param args provided arguments. */ public static void main(String[] args) { if (args.length != 1) { System.out.println( "Please provide the correct arguments.\nUsage: Simulator <simulation-config.xml>"); System.exit(1); } final List<Simulator> simulators = SimulatorShell.prepare(new File(args[0])); ProgressText progress = new ProgressText(simulators.size()); SimulatorShell.execute(simulators, progress); }
/** * Iterate through all the available XML simulation specifications and instantiate the needed * objects, as well as making the simulations ready for execution. After this process, discard the * constructed instances. * * <p>Tests will pass if all instance creation for the defined simulations succeed. */ @Test public void simulationConstruction() { for (String filename : getXMLFiles()) { System.out.println("Constructing specification: " + filename); List<Simulator> sims = SimulatorShell.prepare(new File("simulator/xml", filename)); for (Simulator s : sims) { s.createSimulation(); } } }