public void Declarations() { var dh = new DollHouse(); var members = dh._GetMembers(); var declare = members.Declarations(); Assert.AreEqual(typeof(Color), declare["Paint"]); var allmembers = dh._GetMembers(MemberTypes.All); Assert.Throws<ArgumentException>(() => allmembers.Declarations()); }
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")); }