Simulator/test/model/agent/humanAgent/aatom/operationalLevel/action/movement/impl/HelbingMovementModuleTest.java
/**
	 * A basic movement test. In this case, the agent should easily move to the
	 * goal position.
	 */
A basic movement test. In this case, the agent should easily move to the
goal position.
A basic movement test . In this case the agent should easily move to the goal position .
@Test
	public void basicMovementTest() {
		AatomHumanAgent a = generateBaseAgent();
		Simulator s = new Simulator.Builder<>().setGui(false).setEndingConditions(new BaseEndingConditions(20)).build();
		s.add(a);
		Thread t = new Thread(s);
		t.start();
		Assert.assertEquals(a.getPosition(), new Position(10, 10));
		try {
			t.join();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		Assert.assertTrue(a.getPosition().distanceTo(new Position(1, 1)) < 0.5);
	}
@ Test public void basicMovementTest ( ) { AatomHumanAgent a = generateBaseAgent ( ) ; Simulator s = new Simulator . Builder < > ( ) . setGui ( false ) . setEndingConditions ( new BaseEndingConditions ( 20 ) ) . build ( ) ; s . add ( a ) ; Thread t = new Thread ( s ) ; t . start ( ) ; Assert . assertEquals ( a . getPosition ( ) , new Position ( 10 , 10 ) ) ; try { t . join ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } Assert . assertTrue ( a . getPosition ( ) . distanceTo ( new Position ( 1 , 1 ) ) < 0.5 ) ; }
A basic movement test.
A basic movement test .