Esempio n. 1
0
        public void CanCreateFormViewModelForAgency()
        {
            // Establish Context
            var viewModelToExpect = new AgencyFormViewModel();

            Agency agency =
                AgencyInstanceFactory.CreateValidTransientAgency();

            _agencyRepository.Expect(r => r.Get(1))
            .Return(agency);

            // Act
            AgencyFormViewModel viewModelRetrieved =
                _agencyManagementService.CreateFormViewModelFor(1);

            // Assert
            viewModelRetrieved.ShouldNotBeNull();
            viewModelRetrieved.Agency.ShouldNotBeNull();
            viewModelRetrieved.Agency.ShouldEqual(agency);
        }