public static BGGCollection CreateCollection(Collection rawCollection) { return new BGGCollection(rawCollection); }
public void TestCollectionConversion() { var rawCollection = new Collection { TermsOfUse = "blah", Items = new List<Item> { NullItemFactory(123), NullItemFactory(456) } }; var collection = new BGGCollection(rawCollection); Assert.AreEqual("blah", collection.TermsOfUse); Assert.AreEqual(2, collection.Items.Count); Assert.AreEqual(123, collection.Items[0].Id); }
public BGGCollection(Raw.Collection.Collection rawCollection) { TermsOfUse = rawCollection.TermsOfUse; Items = rawCollection.Items.Select(i => new Item(i)).ToList(); }