Пример #1
0
        public void ContentType2_To_RenderModelOf_ContentType1()
        {
            var content  = new ContentType2(null);
            var view     = new RenderModelOfContentType1TestPage();
            var viewData = new ViewDataDictionary(content);

            view.ViewContext = GetViewContext();
            view.SetViewDataX(viewData);

            Assert.IsInstanceOf <RenderModel <ContentType1> >(view.Model);
            Assert.IsInstanceOf <ContentType1>(view.Model.Content);
        }
Пример #2
0
        public void RenderModel_ContentType1_To_RenderModelOf_ContentType1()
        {
            var content  = new ContentType1(null);
            var model    = new RenderModel(content, CultureInfo.InvariantCulture);
            var view     = new RenderModelOfContentType1TestPage();
            var viewData = new ViewDataDictionary(model);

            view.ViewContext = GetViewContext();
            view.SetViewDataX(viewData);

            Assert.IsInstanceOf <RenderModel <ContentType1> >(view.Model);
            Assert.IsInstanceOf <ContentType1>(view.Model.Content);
        }