public void CanCreateFormViewModel() { // Establish Context TemplateFormViewModel viewModelToExpect = new TemplateFormViewModel(); // Act TemplateFormViewModel viewModelRetrieved = templateManagementService.CreateFormViewModel(); // Assert viewModelRetrieved.ShouldNotBeNull(); viewModelRetrieved.Template.ShouldBeNull(); }
public void CanCreateFormViewModelForTemplate() { // Establish Context TemplateFormViewModel viewModelToExpect = new TemplateFormViewModel(); Template template = TemplateInstanceFactory.CreateValidTransientTemplate(); templateRepository.Expect(r => r.Get(1)) .Return(template); // Act TemplateFormViewModel viewModelRetrieved = templateManagementService.CreateFormViewModelFor(1); // Assert viewModelRetrieved.ShouldNotBeNull(); viewModelRetrieved.Template.ShouldNotBeNull(); viewModelRetrieved.Template.ShouldEqual(template); }