Esempio n. 1
0
        public void CanGetWrmsSystem()
        {
            // Establish Context
            WrmsSystem wrmsSystemToExpect =
                WrmsSystemInstanceFactory.CreateValidTransientWrmsSystem();

            _wrmsSystemRepository.Expect(r => r.Get(1))
            .Return(wrmsSystemToExpect);

            // Act
            WrmsSystem wrmsSystemRetrieved =
                _wrmsSystemManagementService.Get(1);

            // Assert
            wrmsSystemRetrieved.ShouldNotBeNull();
            wrmsSystemRetrieved.ShouldEqual(wrmsSystemToExpect);
        }
Esempio n. 2
0
 protected void ValidateRequest(Request request)
 {
     if (!string.IsNullOrEmpty(request.ShortDesc))
     {
         Check.Require(_requestRepository.GetCount(request.ShortDesc, request.Id) == 0,
                       "Request Short Description already exists");
     }
     if (request.SystemId != null && request.SystemId.HasValue)
     {
         var wrmsSystem = _wrmsSystemManagementService.Get(request.SystemId.Value);
         Check.Require(wrmsSystem.IsActive == true,
                       "The system you selected is inactive.  Please select another.");
     }
     if (request.IsRequestSignedOff == null)
     {
         request.IsRequestSignedOff = false;
     }
 }
Esempio n. 3
0
        public ActionResult Show(int id)
        {
            WrmsSystem wrmsSystem = _wrmsSystemManagementService.Get(id);

            return(View(wrmsSystem));
        }