public void testCleanClean() { VacuumEnvironment tve = new VacuumEnvironment( VacuumEnvironment.LocationState.Clean, VacuumEnvironment.LocationState.Clean); tve.addAgent(agent, VacuumEnvironment.LOCATION_A); tve.addEnvironmentView(new EnvironmentViewActionTracker(envChanges)); tve.stepUntilDone(); Assert.assertEquals("Action[name==Right]Action[name==NoOp]", envChanges .ToString()); }
public void testDirtyDirty() { VacuumEnvironment tve = new VacuumEnvironment( VacuumEnvironment.LocationState.Dirty, VacuumEnvironment.LocationState.Dirty); tve.addAgent(agent, VacuumEnvironment.LOCATION_A); tve.addEnvironmentView(new EnvironmentViewActionTracker(envChanges)); tve.step(8); Assert .assertEquals( "Action[name==Suck]Action[name==Right]Action[name==Suck]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]", envChanges.ToString()); }