예제 #1
0
        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" }));
        }
예제 #2
0
        public void GetRobotByActivationCodeLogicTest()
        {
            var code = data.Robots.Data.First().ActivationCode;

            Assert.AreSame(data.Robots.Data.First(), _manager.GetRobotByActivationCode(code));
        }