public ViewResult AddProgramToRobot(ProgramSummary programSummary) { foreach (var robotId in programSummary.RobotIds) { var robot = _robotManager.GetRobotById(robotId); var program = _programManager.GetProgramById(programSummary.ProgramId); _programManager.CreateProgramRobot(robot, program); _commandManager.CreateRobotCommand(robot, program, RobotCommandTypes.Install); } return(View()); }
public void GetRobotByIdLogicTest() { var id = data.Robots.Data.First().RobotID; Assert.AreSame(data.Robots.Data.First(), _manager.GetRobotById(id)); }