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 testAgentObservation() {
		AatomHumanAgent agent = generateBaseAgent();
		Simulator s = new Simulator.Builder<>().setEndingConditions(new BaseEndingConditions(20)).setGui(false).build();
		s.add(agent);
		Thread t = new Thread(s);
		t.start();
		while(!s.isRunning()) {
		}
		s.setRunning(false);
		Collection<HumanAgent> a = observation.getObservation(HumanAgent.class);
		s.step();
		Assert.assertEquals(a.size(), 1);
	}
@ Test public void testAgentObservation ( ) { AatomHumanAgent agent = generateBaseAgent ( ) ; Simulator s = new Simulator . Builder < > ( ) . setEndingConditions ( new BaseEndingConditions ( 20 ) ) . setGui ( false ) . build ( ) ; s . add ( agent ) ; Thread t = new Thread ( s ) ; t . start ( ) ; while ( ! s . isRunning ( ) ) { } s . setRunning ( false ) ; Collection < HumanAgent > a = observation . getObservation ( HumanAgent . class ) ; s . step ( ) ; Assert . assertEquals ( a . size ( ) , 1 ) ; }
Tests the observation of a human agent.
Tests the observation of a human agent .