Пример #1
0
        public void CanCreateFormViewModel()
        {
            // Establish Context
            var viewModelToExpect = new RequestStatusFormViewModel();

            // Act
            RequestStatusFormViewModel viewModelRetrieved =
                _requestStatusManagementService.CreateFormViewModel();

            // Assert
            viewModelRetrieved.ShouldNotBeNull();
            viewModelRetrieved.RequestStatus.ShouldBeNull();
        }
Пример #2
0
        public void CanCreateFormViewModelForRequestStatus()
        {
            // Establish Context
            var viewModelToExpect = new RequestStatusFormViewModel();

            RequestStatus requestStatus =
                RequestStatusInstanceFactory.CreateValidTransientRequestStatus();

            _requestStatusRepository.Expect(r => r.Get(1))
            .Return(requestStatus);

            // Act
            RequestStatusFormViewModel viewModelRetrieved =
                _requestStatusManagementService.CreateFormViewModelFor(1);

            // Assert
            viewModelRetrieved.ShouldNotBeNull();
            viewModelRetrieved.RequestStatus.ShouldNotBeNull();
            viewModelRetrieved.RequestStatus.ShouldEqual(requestStatus);
        }