Пример #1
0
 public static BGGThings CreateThings(Things rawThings)
 {
     return new BGGThings(rawThings);
 }
Пример #2
0
 public BGGThings(Raw.Things.Things rawThings)
 {
     TermsOfUse = rawThings.TermsOfUse;
     Items      = rawThings.Items.Select(i => new Item(i)).ToList();
 }
Пример #3
0
        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);
        }