public void Get_ServiceRequest_Return_NotFound()
 {
     using (var context = new ServiceRequestContext())
     {
         ServiceRequest sr         = GetServiceRequest();
         var            controller = new ServiceRequestController(context);
         _ = controller.PostServiceRequest(sr);
         var contentStatus = (NotFoundResult)controller.GetServiceRequest(new Guid("dadd45b9-d13d-4fd1-9f29-514aa8459e0d")).Result.Result;
         Assert.NotNull(contentStatus);
         Assert.Equal(404, contentStatus.StatusCode);
     }
 }
 public void Delete_ServiceRequest_Request_Is_Deleted()
 {
     using (var context = new ServiceRequestContext())
     {
         ServiceRequest sr         = GetServiceRequest();
         var            controller = new ServiceRequestController(context);
         _ = controller.PostServiceRequest(sr);
         var result      = controller.DeleteServiceRequest(sr.id);
         var deletedItem = controller.GetServiceRequest(sr.id);
         Assert.NotNull(result);
         Assert.Equal(sr, result.Result.Value);
         Assert.Null(deletedItem.Result.Value);
     }
 }
        public void Put_ServiceRequest_Return_ServiceRequest()
        {
            using (var context = new ServiceRequestContext())
            {
                ServiceRequest sr = GetServiceRequest();
                sr.currentStatus = "InProgress";
                var controller = new ServiceRequestController(context);
                _ = controller.PutServiceRequest(sr.id, sr);
                var result = controller.GetServiceRequest(sr.id);

                Assert.NotNull(result);
                Assert.Equal(sr, result.Result.Value);
            }
        }
        public void Get_ServiceRequest_Return_ServiceRequest()
        {
            using (var context = new ServiceRequestContext())
            {
                ServiceRequest sr = GetServiceRequest();

                var controller = new ServiceRequestController(context);
                var result     = controller.PostServiceRequest(sr);
                result = controller.GetServiceRequest(sr.id);

                Assert.NotNull(result);
                Assert.NotNull(result.Result);
                Assert.Equal(sr, result.Result.Value);
            }
        }