public ActionResult BuilderAssistant()
        {
            var user = HttpContext.User as CustomPrincipal;

            var sets = setService.BuilderAssistent(user.Id);

            ViewBag.listItems = sets;

            return(View());
        }
        public void BuilderAssistentTestCount1()
        {
            userRepository.Setup(s => s.GetById(1)).Returns(new User()
            {
                Id    = 1,
                LSets = new List <UserLSet>()
                {
                    new UserLSet()
                    {
                        LSet  = lSets.First(),
                        Owned = 1,
                        Built = 0
                    }
                }
            });
            var sets = setService.BuilderAssistent(1);

            Assert.AreEqual(2, sets.Count);
        }
Esempio n. 3
0
        public List <LSetApi> BuilderAssistend(int userId)
        {
            var possibleSets = setServices.BuilderAssistent(userId);

            return(Mapper.Map <List <LSetApi> >(possibleSets));
        }