Simulator/test/model/agent/humanAgent/HumanAgentTest.java
/**
	 * Test actions after the agent was removed.
	 */
Test actions after the agent was removed.
Test actions after the agent was removed .
@Test(expected = IllegalArgumentException.class)
	public void testNegativeTimeStep() {
		HumanAgent agent = new HumanAgent(new Position(10, 10), 0.2, 80, Color.RED) {
			@Override
			public void update(int timeStep) {
				super.update(timeStep);
				setLog(new String[] { "Hello" });
			}
			@Override
			public boolean wantsToBeDestoryed() {
				return map.getTime() > 1;
			}
			@Override
			public <T> Collection<T> getObservation(Class<T> type) {
				return null;
			}
			@Override
			public void communicate(CommunicationType type, Object communication) {
			}
		};
		agent.update(-1);
	}
@ Test ( expected = IllegalArgumentException . class ) public void testNegativeTimeStep ( ) { HumanAgent agent = new HumanAgent ( new Position ( 10 , 10 ) , 0.2 , 80 , Color . RED ) { @ Override public void update ( int timeStep ) { super . update ( timeStep ) ; setLog ( new String [ ] { "Hello" } ) ; } @ Override public boolean wantsToBeDestoryed ( ) { return map . getTime ( ) > 1 ; } @ Override public < T > Collection < T > getObservation ( Class < T > type ) { return null ; } @ Override public void communicate ( CommunicationType type , Object communication ) { } } ; agent . update ( - 1 ) ; }
Test actions after the agent was removed.
Test actions after the agent was removed .