Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void testImportVehicles() throws Exception {
- System.out.println("importVehicles");
- String path = "test.xml";
- LinkedList<VelocityLimit> velocityList = new LinkedList<>();
- VelocityLimit v1 = new VelocityLimit("Highway", 31);
- VelocityLimit v2 = new VelocityLimit("Road", 22);
- velocityList.add(v1);
- velocityList.add(v2);
- LinkedList<Gear> gearList = new LinkedList<>();
- Gear g1 = new Gear(01,4.5F );
- Gear g2 = new Gear(02,3.5F );
- gearList.add(g1);
- gearList.add(g2);
- LinkedList<Regime> regimeList = new LinkedList<>();
- Regime r1 = new Regime(115, 125, 900, 1499, 500);
- regimeList.add(r1);
- LinkedList<Throttle> throttleList = new LinkedList<>();
- Throttle t1 = new Throttle(25, regimeList);
- throttleList.add(t1);
- Energy energy = new Energy(900, 5500, 4F, 0.0F, gearList, throttleList);
- Vehicle test = new Vehicle("Pick_up","test","car", 2, "diesel",Motorization.COMBUSTION, 2400, 1200, 0.39F, 2.4F, 0.015F, 0.8F, velocityList, energy);
- LinkedList<Vehicle> expResult = new LinkedList<>();
- expResult.add(test);
- LinkedList<Vehicle> result = ImportVehicleXML.importVehicles(path);
- assertEquals(expResult, result);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement