public void CanCreateFormViewModel() { // Establish Context var viewModelToExpect = new HostFormViewModel(); // Act HostFormViewModel viewModelRetrieved = _hostManagementService.CreateFormViewModel(); // Assert viewModelRetrieved.ShouldNotBeNull(); viewModelRetrieved.Host.ShouldBeNull(); }
public void CanCreateFormViewModelForHost() { // Establish Context var viewModelToExpect = new HostFormViewModel(); Host host = HostInstanceFactory.CreateValidTransientHost(); _hostRepository.Expect(r => r.Get(1)) .Return(host); // Act HostFormViewModel viewModelRetrieved = _hostManagementService.CreateFormViewModelFor(1); // Assert viewModelRetrieved.ShouldNotBeNull(); viewModelRetrieved.Host.ShouldNotBeNull(); viewModelRetrieved.Host.ShouldEqual(host); }