public void CanCreateFormViewModel() { // Establish Context var viewModelToExpect = new OrgFormViewModel(); // Act OrgFormViewModel viewModelRetrieved = _orgManagementService.CreateFormViewModel(); // Assert viewModelRetrieved.ShouldNotBeNull(); viewModelRetrieved.Org.ShouldBeNull(); }
public void CanCreateFormViewModelForOrg() { // Establish Context var viewModelToExpect = new OrgFormViewModel(); Org org = OrgInstanceFactory.CreateValidTransientOrg(); _orgRepository.Expect(r => r.Get(1)) .Return(org); // Act OrgFormViewModel viewModelRetrieved = _orgManagementService.CreateFormViewModelFor(1); // Assert viewModelRetrieved.ShouldNotBeNull(); viewModelRetrieved.Org.ShouldNotBeNull(); viewModelRetrieved.Org.ShouldEqual(org); }