public void testAgentActionNumber4() { tve2.addAgent(a, "B"); assertEquals("B", tve2.getAgentLocation(a)); assertEquals(1, tve2.getAgents().size()); tve2.step(); // moves to location A assertEquals("A", tve2.getAgentLocation(a)); assertEquals("Clean", tve2.getLocation1Status()); tve2.step(); // NOOP assertEquals("A", tve2.getAgentLocation(a)); assertEquals("Clean", tve2.getLocation1Status()); assertEquals("Clean", tve2.getLocation2Status()); assertEquals(-1, tve.getAgentperformance(a)); }
public void testAgentActionNumber8() { tve4.addAgent(a, "B"); assertEquals("B", tve4.getAgentLocation(a)); assertEquals(1, tve4.getAgents().size()); tve4.step(); // moves to A assertEquals("A", tve4.getAgentLocation(a)); assertEquals("Dirty", tve4.getLocation1Status()); tve4.step(); // cleans A assertEquals("A", tve4.getAgentLocation(a)); assertEquals("Clean", tve4.getLocation1Status()); tve4.step(); // NOOP assertEquals("A", tve4.getAgentLocation(a)); assertEquals("Clean", tve4.getLocation1Status()); assertEquals("Clean", tve4.getLocation2Status()); assertEquals(9, tve.getAgentperformance(a)); }