public void SupervisorThrowsExceptionWithNullArena () { Assert.Throws<ArgumentNullException>(() => { var gameSupervisor = new GameSupervisor(null); }); }
public void SupervisorNeedsToKnowAboutARobot () { var arena = new RectangularArena(1, 1); var robot = new Robot("Will Smith", new Point(0, 0), 'N'); var gameSupervisor = new GameSupervisor(arena); gameSupervisor.AddRobot(robot); Assert.NotNull(gameSupervisor.Robots); }
public void SupervisorCanHaveMultipleRobots () { var arena = new RectangularArena(1, 1); var robot = new Robot("Will Smith", new Point(0, 0), 'N'); var gameSupervisor = new GameSupervisor(arena); gameSupervisor.AddRobot(robot); var robot2 = new Robot("Jaden Smith", new Point(0, 0), 'N'); gameSupervisor.AddRobot(robot2); Assert.True(gameSupervisor.Robots.Exists(x => x.Name == "Will Smith")); Assert.True(gameSupervisor.Robots.Any(x => x.Name == "Jaden Smith")); }
public void SupervisorNeedsToKnowAboutAnRectangularArena () { var arena = new RectangularArena(1, 1); var gameSupervisor = new GameSupervisor(arena); Assert.NotNull(gameSupervisor.Arena); }