public void OTRequest_Service_GetByIdUT1() { //call action otRequest = objServices.GetById(1); // compare Assert.IsNotNull(otRequest); }
public async Task <HttpResponseMessage> GetById(HttpRequestMessage request, int id) { return(await CreateHttpResponse(request, () => { var model = _otrequestService.GetById(id); var responseData = Mapper.Map <OTRequest, OTRequestViewModel>(model); var response = request.CreateResponse(HttpStatusCode.OK, responseData); return response; })); }