コード例 #1
0
 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());
 }
コード例 #2
0
        public void GetRobotByIdLogicTest()
        {
            var id = data.Robots.Data.First().RobotID;

            Assert.AreSame(data.Robots.Data.First(), _manager.GetRobotById(id));
        }