Simulator/test/model/agent/humanAgent/aatom/operationalLevel/action/movement/impl/HelbingMovementModuleTest.java
/**
	 * The basic movement model moves around the walls.
	 */
The basic movement model moves around the walls.
The basic movement model moves around the walls .
@Test
	public void basicWallMovementTest() {
		Simulator s2 = new Simulator.Builder<>().setGui(false).setEndingConditions(new BaseEndingConditions(20))
				.build();
		AatomHumanAgent a2 = generateBaseAgent();
		Wall w = new Wall(7, 2, 0.1, 8);
		s2.add(w);
		s2.add(a2);
		Thread t2 = new Thread(s2);
		t2.start();
		Assert.assertEquals(a2.getPosition(), new Position(10, 10));
		try {
			t2.join();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		Assert.assertTrue(a2.getPosition().distanceTo(new Position(1, 1)) < 0.5);
	}
@ Test public void basicWallMovementTest ( ) { Simulator s2 = new Simulator . Builder < > ( ) . setGui ( false ) . setEndingConditions ( new BaseEndingConditions ( 20 ) ) . build ( ) ; AatomHumanAgent a2 = generateBaseAgent ( ) ; Wall w = new Wall ( 7 , 2 , 0.1 , 8 ) ; s2 . add ( w ) ; s2 . add ( a2 ) ; Thread t2 = new Thread ( s2 ) ; t2 . start ( ) ; Assert . assertEquals ( a2 . getPosition ( ) , new Position ( 10 , 10 ) ) ; try { t2 . join ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } Assert . assertTrue ( a2 . getPosition ( ) . distanceTo ( new Position ( 1 , 1 ) ) < 0.5 ) ; }
The basic movement model moves around the walls.
The basic movement model moves around the walls .