Simulator/test/model/agent/humanAgent/aatom/operationalLevel/action/movement/impl/RandomMovementModuleTest.java
/**
	 * A basic movement test. In this case, the agent should move randomly. The
	 * expected ending position is based on the specified random seed.
	 */
A basic movement test. In this case, the agent should move randomly. The
expected ending position is based on the specified random seed.
A basic movement test . In this case the agent should move randomly . The expected ending position is based on the specified random seed .
@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(5, 5));
		try {
			t.join();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		Assert.assertEquals(a.getPosition().x, 4.099, 0.01);
		Assert.assertEquals(a.getPosition().y, 8.283, 0.01);
	}
@ 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 ( 5 , 5 ) ) ; try { t . join ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } Assert . assertEquals ( a . getPosition ( ) . x , 4.099 , 0.01 ) ; Assert . assertEquals ( a . getPosition ( ) . y , 8.283 , 0.01 ) ; }
A basic movement test.
A basic movement test .