Simulator/test/model/environment/objects/physicalObject/luggage/LuggageTest.java
/**
	 * Test the setting of the owner.
	 */
Test the setting of the owner.
Test the setting of the owner .
@Test
	public void testOwnerSetting() {
		Luggage l = new Luggage(LuggageType.CARRY_ON, 0, 0);
		QueuingArea checkpointQueue = new QueuingArea(10, 10, 4, 4, new Position(10, 10), new Position(14, 14));
		GateArea gate = new GateArea(1, 1, 5, 5);
		QueuingArea checkInQueue = new QueuingArea(4, 5, 3, 3, new Position(7, 8), new Position(4, 5));
		Desk d = new Desk(4, 4, 1, 0.1, new Position(4.5, 4.3));
		List<Desk> desks = new ArrayList<>();
		desks.add(d);
		Flight f = new Flight(FlightType.ARRIVING, 7200, gate, desks, checkInQueue, checkpointQueue);
		Passenger p = new Passenger.Builder<>().setPosition(new Position(10, 10)).setFlight(f).build();
		l.setOwner(p);
		Assert.assertEquals(p.getPosition(), l.getPosition());
	}
@ Test public void testOwnerSetting ( ) { Luggage l = new Luggage ( LuggageType . CARRY_ON , 0 , 0 ) ; QueuingArea checkpointQueue = new QueuingArea ( 10 , 10 , 4 , 4 , new Position ( 10 , 10 ) , new Position ( 14 , 14 ) ) ; GateArea gate = new GateArea ( 1 , 1 , 5 , 5 ) ; QueuingArea checkInQueue = new QueuingArea ( 4 , 5 , 3 , 3 , new Position ( 7 , 8 ) , new Position ( 4 , 5 ) ) ; Desk d = new Desk ( 4 , 4 , 1 , 0.1 , new Position ( 4.5 , 4.3 ) ) ; List < Desk > desks = new ArrayList < > ( ) ; desks . add ( d ) ; Flight f = new Flight ( FlightType . ARRIVING , 7200 , gate , desks , checkInQueue , checkpointQueue ) ; Passenger p = new Passenger . Builder < > ( ) . setPosition ( new Position ( 10 , 10 ) ) . setFlight ( f ) . build ( ) ; l . setOwner ( p ) ; Assert . assertEquals ( p . getPosition ( ) , l . getPosition ( ) ) ; }
Test the setting of the owner.
Test the setting of the owner .
// create luggage // create flight // create passenger