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); }
public void RenderModel_ContentType2_To_ContentType1() { var content = new ContentType2(null, Mock.Of <IPublishedValueFallback>()); var view = new ContentType1TestPage(); ViewDataDictionary <ContentType1> viewData = GetViewDataDictionary <ContentType1>(content); view.ViewData = viewData; Assert.IsInstanceOf <ContentType1>(view.Model); }
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); }
public void ContentType2_To_RenderModelOf_ContentType1() { // Same as above but with ContentModel<ContentType2> var content = new ContentType2(null, Mock.Of <IPublishedValueFallback>()); var view = new RenderModelOfContentType1TestPage(); var viewData = GetViewDataDictionary <ContentType2>(content); view.SetViewData(viewData); Assert.IsInstanceOf <ContentModel <ContentType1> >(view.Model); Assert.IsInstanceOf <ContentType1>(view.Model.Content); }
public void RenderModelOf_ContentType2_To_RenderModelOf_ContentType1() { var content = new ContentType2(null); var model = new ContentModel <ContentType2>(content); var view = new RenderModelOfContentType1TestPage(); var viewData = new ViewDataDictionary(model); view.ViewContext = GetViewContext(); view.SetViewDataX(viewData); Assert.IsInstanceOf <ContentModel <ContentType1> >(view.Model); Assert.IsInstanceOf <ContentType2>(view.Model.Content); }
public void RenderModelOf_ContentType2_To_ContentType1() { var content = new ContentType2(null, Mock.Of <IPublishedValueFallback>()); var model = new ContentModel <ContentType2>(content); var view = new ContentType1TestPage(); var viewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), new ModelStateDictionary()) { Model = model }; view.SetViewData(viewData); Assert.IsInstanceOf <ContentType1>(view.Model); }
public PixivBrowsingHistory(IPixivClient pixivClient, ContentType2 contentType, IQueryCacheService queryCacheService) { _pixivClient = pixivClient; _contentType = contentType; _queryCacheService = queryCacheService; _offset = ""; Illusts = new ObservableCollection <IIllust>(); Novels = new ObservableCollection <INovel>(); #if OFFLINE HasMoreItems = false; #else HasMoreItems = true; #endif }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 1: { m_ContentType2 = (ContentType2)reader.ReadInt(); goto case 0; } case 0: { m_ContentRemaining = reader.ReadInt(); break; } } }