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 testWaitingCommunication2() {
		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();
		try {
			Thread.sleep(10);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		a.communicate(CommunicationType.WAIT, 150.0);
		try {
			Thread.sleep(10);
			t.join();
		} catch (InterruptedException e1) {
			e1.printStackTrace();
		}
		Assert.assertTrue(a.getStopOrder());
	}
@ Test public void testWaitingCommunication2 ( ) { 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 ( ) ; try { Thread . sleep ( 10 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } a . communicate ( CommunicationType . WAIT , 150.0 ) ; try { Thread . sleep ( 10 ) ; t . join ( ) ; } catch ( InterruptedException e1 ) { e1 . printStackTrace ( ) ; } Assert . assertTrue ( a . getStopOrder ( ) ) ; }
Tests if the waiting order is received properly.
Tests if the waiting order is received properly .