public void GivenValueInit_PropertyMustEqualInput() { var c = new NullComicVisiting <object>(); var slot = new ChapterSlots <object>(c); Assert.AreEqual(c, slot.Visiting); }
public void GivenPageManager_MustCreatedSlots() { var mgr = new NullComicVisiting <object>(); var slot = ComicChapterManagerExtensions.CreateChapterSlots(mgr); Assert.IsNotNull(slot); Assert.AreEqual(mgr, slot.Visiting); }
private NullComicVisiting <T> MakeVisiting <T>(int chapterCount) { var visit = new NullComicVisiting <T>(); visit.Entity = new ComicEntity { Chapters = Enumerable.Range(0, chapterCount).Select(x => new ComicChapter { TargetUrl = "http://localhost:5000/" + x, Title = x.ToString() }).ToArray() }; return(visit); }
public async Task Init_CallGetCreate_MustReturnNotNull() { var factor = new StreamResourceFactoryCreator(); var prov = new NullSourceProvider(); var addr = "sdasafsd"; var visit = new NullComicVisiting <Stream>(); var ctx = new ResourceFactoryCreateContext <Stream> { SourceProvider = prov, Address = addr, Visiting = visit }; Assert.AreEqual(prov, ctx.SourceProvider); Assert.AreEqual(addr, ctx.Address); Assert.AreEqual(visit, ctx.Visiting); Assert.AreEqual(visit.Host, ctx.ServiceProvider); var c = await factor.CreateAsync(ctx); Assert.IsNotNull(c); c.Dispose(); factor.Dispose(); }