Ejemplo n.º 1
0
        public IHttpActionResult AllBadgeTypes()
        {
            var badgeTypes = _badgeService.GetAllBadgeTypes();

            if (badgeTypes != null)
            {
                var badgeTypeDTOs = badgeTypes as List <BadgeTypeDTO> ?? badgeTypes.ToList();
                if (badgeTypeDTOs.Any())
                {
                    return(Ok(badgeTypeDTOs));
                }
            }
            return(NotFound());
        }
Ejemplo n.º 2
0
        public void WhenGettingAllBadgeTypes_AssertReturnedCollection()
        {
            var badgeTypes = _badgeService.GetAllBadgeTypes();

            Assert.Equal(DataInitializer.GetAllBadgeTypes().Count, badgeTypes.Count());
        }