Simulator/test/model/agent/humanAgent/aatom/operationalLevel/action/movement/impl/HelbingMovementModuleTest.java
/**
	 * The helbing movement model will remove its goal if it is stuck inside a
	 * room.
	 */
The helbing movement model will remove its goal if it is stuck inside a
room.
The helbing movement model will remove its goal if it is stuck inside a room .
@Test
	public void basicWallStuckMovementTest() {
		Simulator s3 = new Simulator.Builder<>().setGui(false).setEndingConditions(new BaseEndingConditions(20))
				.build();
		AatomHumanAgent a3 = generateBaseAgent();
		Wall w = new Wall(7, 2, 0.1, 9);
		Wall w2 = new Wall(7, 11, 4, 0.1);
		Wall w3 = new Wall(7, 2, 4, 0.1);
		Wall w4 = new Wall(11, 2, 0.1, 9);
		s3.add(w);
		s3.add(w2);
		s3.add(w3);
		s3.add(w4);
		s3.add(a3);
		Thread t3 = new Thread(s3);
		t3.start();
		Assert.assertEquals(a3.getPosition(), new Position(10, 10));
		Assert.assertEquals(a3.getGoalPosition(), new Position(1, 1));
		try {
			t3.join();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		Assert.assertEquals(a3.getPosition(), new Position(10, 10));
		Assert.assertEquals(a3.getGoalPosition(), Position.NO_POSITION);
	}
@ Test public void basicWallStuckMovementTest ( ) { Simulator s3 = new Simulator . Builder < > ( ) . setGui ( false ) . setEndingConditions ( new BaseEndingConditions ( 20 ) ) . build ( ) ; AatomHumanAgent a3 = generateBaseAgent ( ) ; Wall w = new Wall ( 7 , 2 , 0.1 , 9 ) ; Wall w2 = new Wall ( 7 , 11 , 4 , 0.1 ) ; Wall w3 = new Wall ( 7 , 2 , 4 , 0.1 ) ; Wall w4 = new Wall ( 11 , 2 , 0.1 , 9 ) ; s3 . add ( w ) ; s3 . add ( w2 ) ; s3 . add ( w3 ) ; s3 . add ( w4 ) ; s3 . add ( a3 ) ; Thread t3 = new Thread ( s3 ) ; t3 . start ( ) ; Assert . assertEquals ( a3 . getPosition ( ) , new Position ( 10 , 10 ) ) ; Assert . assertEquals ( a3 . getGoalPosition ( ) , new Position ( 1 , 1 ) ) ; try { t3 . join ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } Assert . assertEquals ( a3 . getPosition ( ) , new Position ( 10 , 10 ) ) ; Assert . assertEquals ( a3 . getGoalPosition ( ) , Position . NO_POSITION ) ; }
The helbing movement model will remove its goal if it is stuck inside a
 room.
The helbing movement model will remove its goal if it is stuck inside a room .