Exemplo n.º 1
0
        public void ContentType2_To_ContentType1()
        {
            var content  = new ContentType2(null);
            var view     = new ContentType1TestPage();
            var viewData = new ViewDataDictionary(content);

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

            Assert.IsInstanceOf <ContentType1>(view.Model);
        }
Exemplo n.º 2
0
        public void RenderModel_ContentType2_To_ContentType1()
        {
            var content  = new ContentType2(null);
            var model    = new RenderModel(content, CultureInfo.InvariantCulture);
            var view     = new ContentType1TestPage();
            var viewData = new ViewDataDictionary(model);

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

            Assert.IsInstanceOf <ContentType1>(view.Model);
        }
Exemplo n.º 3
0
        public void RenderModelOf_ContentType1_To_ContentType1()
        {
            var content  = new ContentType1(null);
            var model    = new ContentModel <ContentType1>(content);
            var view     = new ContentType1TestPage();
            var viewData = new ViewDataDictionary(model);

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

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