public ActionResult AddRobotForm(RobotActivationCode activationCode) { var robot = _robotManager.GetRobotByActivationCode(activationCode.Code); _robotManager.BindRobotToUser(robot, FakeSession.User); FakeSession.RobotIds.Add(robot.RobotID); return(RedirectToAction("ShowMyRobots", "Robot", new { category = "My Robots" })); }
public void GetRobotByActivationCodeLogicTest() { var code = data.Robots.Data.First().ActivationCode; Assert.AreSame(data.Robots.Data.First(), _manager.GetRobotByActivationCode(code)); }