public IHttpActionResult Get(int id) { var post = _appService.GetPostById(id); if (post == null) { return(NotFound()); } return(Ok(post)); }
public void GetPostByIdByService() { _manager.GetPostById(1); _mockPosts.Verify(m => m.Get(It.Is <int>(arg => arg == 1)), Times.Once); }