public void given_automapped_model_then_model_maps_to_viewModel() { StubRenderMethod(); mapper.Stub(x => x.Map <vmPage_ExampleViewModel>(null, null)).IgnoreArguments().Return(exampleViewModel); svc.Render <vmPage_ExampleViewModel>(exampleModel, false, settings); Assert.AreEqual(settings.Data(), exampleViewModel); }
public void given_automapped_model_then_model_maps_to_viewModel() { StubRenderMethod(); mapper.Setup(x => x.Map <vmPage_ExampleViewModel>(It.IsAny <object>(), It.IsAny <IDictionary <string, object> >())).Returns(exampleViewModel); svc.Object.Render <vmPage_ExampleViewModel>(exampleModel, false, settings); Assert.AreEqual(settings.Data(), exampleViewModel); }