Пример #1
0
        public IActionResult Index()
        {
            List <Badge> badges = _badgeService.GetBadges();

            //Badge badge = new Badge
            //{
            //    Title = "Over archivement",
            //    Label = "Overload these lasts times : 10x more products bought than usual !!!",
            //    Picture = "OverArchivement.png"
            //};
            //badges.Add(badge);
            //badge = new Badge
            //{
            //    Title = "Gost",
            //    Label = "Long time not seen, you moron è_é",
            //    Picture = "gost.png"
            //};
            //badges.Add(badge);
            //badge = new Badge
            //{
            //    Title = "Hardware Buyer",
            //    Label = "What are you gonna do with all these mics ?",
            //    Picture = "hardwareBuyer.png"
            //};
            //badges.Add(badge);


            return(View(badges));
        }
Пример #2
0
 // GET: api/Badges
 public IEnumerable <BadgeDto> GetBadges()
 {
     return(badgeSvc.GetBadges().Select(b => BadgeDto.FromBadge(b)));
 }
Пример #3
0
 // GET api/Badge
 public IList <Badge> GetBadges()
 {
     return(_badgeService.GetBadges());
 }
Пример #4
0
        public IActionResult Index()
        {
            List <Badge> badges = _badgeService.GetBadges();

            return(View(badges));
        }
Пример #5
0
        public void GetAllBadges()
        {
            var badges = _badgeService.GetBadges();

            CollectionAssert.AreEqual(badges.ToArray(), _badges.ToArray());
        }