public static BGGThings CreateThings(Things rawThings) { return new BGGThings(rawThings); }
public BGGThings(Raw.Things.Things rawThings) { TermsOfUse = rawThings.TermsOfUse; Items = rawThings.Items.Select(i => new Item(i)).ToList(); }
public void TestThingsConversion() { var rawThings = new Things { TermsOfUse = "blah", Items = new List<Item> { NullItemFactory(123), NullItemFactory(456) } }; var things = new BGGThings(rawThings); Assert.AreEqual("blah", things.TermsOfUse); Assert.AreEqual(2, things.Items.Count); Assert.AreEqual(123, things.Items[0].Id); }