private HeadlineViewModel CreateMockContent() { var mockedUmbracoContent = new PublishedContentMockingHelper(); mockedUmbracoContent.AddProperty("header", _testTitle); mockedUmbracoContent.AddProperty("body", _testBody); return((HeadlineViewModel)_builder.CreateViewModel(mockedUmbracoContent.ContentMock)); }
public void WhenCreateViewModelItShouldGetTesMessageFromUmbraco() { var mockedUmbracoContent = new PublishedContentMockingHelper(); var testMessage = "test header"; mockedUmbracoContent.AddProperty("header", testMessage); var viewModel = (ImageSectionViewModel)_builder.CreateViewModel(mockedUmbracoContent.ContentMock); Assert.AreEqual(testMessage, viewModel.Header); }