コード例 #1
0
        public async Task <IHttpActionResult> GetBadge(long id)
        {
            Badge badge = await _badgeService.FindBadge(id);

            if (badge == null)
            {
                return(NotFound());
            }

            return(Ok(badge));
        }
コード例 #2
0
        public void GetBadgeFromId()
        {
            long id    = 8;
            var  point = _badgeService.FindBadge(id);

            Assert.AreEqual(point.Result, _badges[(int)id - 1]);
        }