public void Constructor_SetsProperties() { var r = new PageRequestModel(); var e = new PageLinkModelBase[] { new PageLinkModel(r, 1, "1"), new PageRangeModel(r, 2, 4) }; var m = new PageChainModel(23, 312, e); Assert.AreEqual(23, m.TotalPageCount); Assert.AreEqual(312, m.TotalItemCount); Assert.AreSame(e, m.PageLinks); }
public void Enumerator_ComesFromPageLinks() { var r = new PageRequestModel(); var e = new PageLinkModelBase[] { new PageLinkModel(r, 1, "1"), new PageRangeModel(r, 2, 4) }; var m = new PageChainModel(432, 321, e); Assert.AreEqual(e.Count(), m.Count()); for (var i = 0; i < e.Count(); i++) { Assert.AreSame(e.ElementAt(i), m.ElementAt(i)); } }