@Before public void setUp() throws Exception { Connection nuCnn = ConnectionContext.getConnection(); if (!nuCnn.isConnected()) { nuCnn.connect(); } grfToTest = new GlGraph(nuCnn, globlToTest); }
/** Helper to setup types and assets at start */ public static void setup() { Connection connection = ConnectionContext.getConnection(); if (!connection.isConnected()) connection.connect("", "", ""); Context.getContext().init(connection); Generator.deleteAllAndGenerateTypes(); // Generate doors (approx 500) logger.info("Generating Doors ..."); Generator.generateDoorPack("Building 1", 1); Generator.generateDoorPack("Building 1", 2); Generator.generateDoorPack("Building 1", 3); Generator.generateDoorPack("Building 1", 4); Generator.generateDoorPack("Building 1", 5); Generator.generateDoorPack("Building 2", 1); Generator.generateDoorPack("Building 2", 2); Generator.generateDoorPack("Building 2", 3); Generator.generateDoorPack("Building 3", 1); Generator.generateDoorPack("Building 3", 2); // Generate people (approx 4000) int doorPacks = 100; logger.info("Generating {} People Packs ...", doorPacks); for (int i = 0; i < doorPacks; i++) { Generator.generatePeoplePack(i); } // Generate Equipment (approx 40000) int equipmentPacks = 600; logger.info("Generating {} Equipment Packs ...", equipmentPacks); for (int i = 0; i < equipmentPacks; i++) { Generator.generateEquipment(i); } DoorType.refreshDoorTypes(); PersonType.refreshPersonTypes(); EquipmentType.refreshEquipmentTypes(); }