public ActionResult UpdateRobotProgram(int programRobotId) { var robot = _robotManager.GetRobotByProgramRobotId(programRobotId); var program = _programManager.GetProgramByProgramRobotId(programRobotId); _commandManager.CreateRobotCommand(robot, program, RobotCommandTypes.Update); _programManager.UpdateVersionProgramRobot(programRobotId); return(new HttpStatusCodeResult(HttpStatusCode.OK)); }
public void GetRobotByProgramRobotIdLogicTest() { var robot = data.Robots.Data.First(); var programRobot = data.ProgramRobots.Data.First(); var result = _manager.GetRobotByProgramRobotId(programRobot.ProgramRobotID); Assert.AreSame(robot, result); }