Beispiel #1
0
 public void CreateProgramRobot(Robot robot, Program program) =>
     data.ProgramRobots.Add(new ProgramRobot
     {
         Program = program,
         Robot = robot,
         CurrentVersion = program.ActualVersion
     });
Beispiel #2
0
 public void CreateRobotCommand(Robot robot, Program program, RobotCommandTypes commandType)
     => data.RobotCommands.Add(new Entities.RobotCommand
     {
         Argument = program.ProgramID,
         Robot = robot,
         Type = (int) commandType
     });
 private void CheckOneTypeCommand(Robot robot, Program program,  RobotCommandTypes type)
 {
   var amount = data.RobotCommands.Data.Count();
   _manager.CreateRobotCommand(robot, program, type);
   var command = data.RobotCommands.Data.Last();
   Assert.AreEqual(amount + 1, data.RobotCommands.Data.Count());
   Assert.AreEqual(command.Argument, program.ProgramID);
   Assert.AreSame(command.Robot, robot);
   Assert.AreEqual(command.Type, (int) type);
 }