public void testAgentActionNumber5() { tve3.addAgent(a, "A"); assertEquals("A", tve3.getAgentLocation(a)); assertEquals(1, tve3.getAgents().size()); tve3.step(); // moves to B assertEquals("B", tve3.getAgentLocation(a)); assertEquals("Dirty", tve3.getLocation2Status()); tve3.step(); // cleans location B assertEquals("B", tve3.getAgentLocation(a)); assertEquals("Clean", tve3.getLocation2Status()); tve3.step(); // NOOP assertEquals("B", tve3.getAgentLocation(a)); assertEquals("Clean", tve3.getLocation1Status()); assertEquals("Clean", tve3.getLocation2Status()); assertEquals(9, tve.getAgentperformance(a)); }
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)); }