public void Should_expand_partial_content_with_specified_model_property_if_specified() { const string input = @"<html><head></head><body>@Partial['testing', Model.User];</body></html>"; var fakeViewEngineHost = new FakeViewEngineHost(); fakeViewEngineHost.GetTemplateCallback = (s, m) => "Hello @Model.Name"; dynamic model = new ExpandoObject(); dynamic subModel = new ExpandoObject(); model.Name = "Jim"; subModel.Name = "Bob"; model.User = subModel; var viewEngine = new SuperSimpleViewEngine(); var result = viewEngine.Render(input, model, fakeViewEngineHost); Assert.Equal(@"<html><head></head><body>Hello Bob</body></html>", result); }