public void CanCreateFormViewModel() { // Establish Context var viewModelToExpect = new ApplicationFormViewModel(); // Act ApplicationFormViewModel viewModelRetrieved = _applicationManagementService.CreateFormViewModel(); // Assert viewModelRetrieved.ShouldNotBeNull(); viewModelRetrieved.Application.ShouldBeNull(); }
public void CanCreateFormViewModelForApplication() { // Establish Context var viewModelToExpect = new ApplicationFormViewModel(); Application application = ApplicationInstanceFactory.CreateValidTransientApplication(); _applicationRepository.Expect(r => r.Get(1)) .Return(application); // Act ApplicationFormViewModel viewModelRetrieved = _applicationManagementService.CreateFormViewModelFor(1); // Assert viewModelRetrieved.ShouldNotBeNull(); viewModelRetrieved.Application.ShouldNotBeNull(); viewModelRetrieved.Application.ShouldEqual(application); }