public void Declarations()
 {
     var dh = new DollHouse();
     var members = dh._GetMembers();
     var declare = members.FieldDeclarations();
     Assert.AreEqual(typeof(Color), declare["Paint"]);
     var allmembers = dh._GetMembers(MemberTypes.All);
     var fields = allmembers.FieldDeclarations();
     Assert.AreEqual("([Paint,System.Drawing.Color],[Rooms,System.String[]],[Size,System.Int32],[Spam,System.String])",
         fields.Print());
 }
 public void PlayWithDollHouse()
 {
     var dh = new DollHouse();
     Assert.AreEqual(2, dh.Size);
     Assert.AreEqual("Eggs", dh.Spam);
     Assert.AreEqual(Color.White, dh.Paint);
     dh.Paint = Color.Black;
     Assert.AreEqual(Color.Black, dh.Paint);
 }
        public void GetMembers()
        {
            DataTable dt = null;
            Assert.IsFalse(dt._GetMembers().Any());

            var dh = new DollHouse();
            var members = dh._GetMembers();
            Assert.AreEqual(4, members.Count());

            var attr = members.FilterAttributeType<DummyAttribute>();
            Assert.AreEqual(1, attr.Count());

            var ro = members.RemoveReadOnly();
            Assert.IsFalse(ro.Names().Contains("Size"));
            Assert.IsTrue(ro.Names().Contains("Rooms"));
            Assert.IsTrue(ro.Names().Contains("Paint"));
        }
 public void FieldTypes()
 {
     var dh = new DollHouse();
     var ft = dh._FieldTypes();
     Assert.AreEqual("([Paint,System.Drawing.Color],[Rooms,System.String[]],[Size,System.Int32],[Spam,System.String])",
         ft.Print());
 }