Beispiel #1
0
        public void CanGetRequest()
        {
            // Establish Context
            Request requestToExpect =
                RequestInstanceFactory.CreateValidTransientRequest();

            _requestRepository.Expect(r => r.Get(1))
            .Return(requestToExpect);

            // Act
            Request requestRetrieved =
                _requestManagementService.Get(1);

            // Assert
            requestRetrieved.ShouldNotBeNull();
            requestRetrieved.ShouldEqual(requestToExpect);
        }
Beispiel #2
0
        public ActionResult Show(int id)
        {
            Request request = _requestManagementService.Get(id);

            return(View(request));
        }
        public ActionResult GetSystemId(string requestId)
        {
            int id;

            return(!int.TryParse(requestId, out id) ? null : Json(_requestManagementService.Get(id).SystemId));
        }