public DemoContent ( ) : System.Web.Mvc.ActionResult | ||
Результат | System.Web.Mvc.ActionResult |
public void DemoContent_RenderingContextItemInitialized_ShouldReturnDemoContentView(Db db,IContactProfileProvider contact, IProfileProvider profile, ITracker tracker) { //arrange var itemID = ID.NewID; db.Add(new DbItem("ctx",itemID, Templates.DemoContent.ID)); var controller = new DemoController(contact, profile); var context = new RenderingContext(); context.ContextItem = db.GetItem(itemID); ContextService.Get().Push(context); using (new TrackerSwitcher(tracker)) { controller.DemoContent().As<ViewResult>().Model.Should().BeOfType<DemoContent>(); } }