public void SerializeCollectionTest() { Room[] rooms = new Room[] { new Room{ Length = 2, Width = 2 }, new Room{ Length = 3, Width = 3 } }; Document d = rooms.Serialize(); Assert.AreEqual(1, d.Count); Assert.IsInstanceOfType(d[""], typeof(IEnumerable)); Assert.AreEqual(2, (d[""] as IEnumerable).Cast<Document>().Count()); Assert.AreEqual(3, (d[""] as IEnumerable).Cast<Document>().ElementAt(1)["Width"]); }
public House(string address, Room[] rooms) { Address = address; Rooms = rooms; }