Simulator/test/model/agent/humanAgent/aatom/operationalLevel/action/communication/impl/BasicPassengerCommunicationModuleTest.java
/**
	 * Tests if the waiting order is received properly.
	 */
Tests if the waiting order is received properly.
Tests if the waiting order is received properly .
@Test
	public void testSearchCommunication() {
		AatomHumanAgent a = generateBaseAgent();
		Simulator s = new Simulator.Builder<>().setEndingConditions(new BaseEndingConditions(120)).setGui(false)
				.build();
		s.add(a);
		Thread t = new Thread(s);
		t.start();
		while(!s.isRunning()) {
		}
		s.setRunning(false);
		a.communicate(CommunicationType.SEARCH, 4.0);
		s.setRunning(true);
		try {
			Thread.sleep(10);
			t.join();
		} catch (InterruptedException e1) {
			e1.printStackTrace();
		}
		Assert.assertFalse(a.getStopOrder());
	}
@ Test public void testSearchCommunication ( ) { AatomHumanAgent a = generateBaseAgent ( ) ; Simulator s = new Simulator . Builder < > ( ) . setEndingConditions ( new BaseEndingConditions ( 120 ) ) . setGui ( false ) . build ( ) ; s . add ( a ) ; Thread t = new Thread ( s ) ; t . start ( ) ; while ( ! s . isRunning ( ) ) { } s . setRunning ( false ) ; a . communicate ( CommunicationType . SEARCH , 4.0 ) ; s . setRunning ( true ) ; try { Thread . sleep ( 10 ) ; t . join ( ) ; } catch ( InterruptedException e1 ) { e1 . printStackTrace ( ) ; } Assert . assertFalse ( a . getStopOrder ( ) ) ; }
Tests if the waiting order is received properly.
Tests if the waiting order is received properly .