Simulator/test/model/agent/humanAgent/aatom/operationalLevel/observation/impl/BasicPassengerObservationModuleTest.java
/**
	 * Tests the observation of a human agent.
	 */
Tests the observation of a human agent.
Tests the observation of a human agent .
@Test
	public void testDeskObservation() {
		Desk d = new Desk(10, 10, 1, 0.1, new Position(10.5, 10.5));
		AatomHumanAgent agent = generateBaseAgent();
		Simulator s = new Simulator.Builder<>().setEndingConditions(new BaseEndingConditions(20)).setGui(false).build();
		s.add(agent);
		s.add(d);
		Thread t = new Thread(s);
		t.start();
		while(!s.isRunning()) {
		}
		s.setRunning(false);
		Collection<Desk> a = observation.getObservation(Desk.class);
		s.setRunning(true);
		Assert.assertEquals(a.size(), 1);
	}
@ Test public void testDeskObservation ( ) { Desk d = new Desk ( 10 , 10 , 1 , 0.1 , new Position ( 10.5 , 10.5 ) ) ; AatomHumanAgent agent = generateBaseAgent ( ) ; Simulator s = new Simulator . Builder < > ( ) . setEndingConditions ( new BaseEndingConditions ( 20 ) ) . setGui ( false ) . build ( ) ; s . add ( agent ) ; s . add ( d ) ; Thread t = new Thread ( s ) ; t . start ( ) ; while ( ! s . isRunning ( ) ) { } s . setRunning ( false ) ; Collection < Desk > a = observation . getObservation ( Desk . class ) ; s . setRunning ( true ) ; Assert . assertEquals ( a . size ( ) , 1 ) ; }
Tests the observation of a human agent.
Tests the observation of a human agent .