public void CtorType_Deny_Unrestricted() { ParseChildrenAttribute pca = new ParseChildrenAttribute(typeof(string)); Assert.IsFalse(pca.ChildrenAsProperties, "ChildrenAsProperties"); Assert.AreEqual(String.Empty, pca.DefaultProperty, "DefaultProperty"); Assert.IsTrue(pca.Equals(pca), "Equals"); Assert.IsFalse(pca.IsDefaultAttribute(), "IsDefaultAttribute"); Assert.IsTrue(pca.GetHashCode() != 0, "GetHashCode"); // likely Assert.AreEqual(typeof(string), pca.ChildControlType, "ChildControlType"); }
public void CtorBoolString_Deny_Unrestricted() { ParseChildrenAttribute pca = new ParseChildrenAttribute(true, "mono"); Assert.IsTrue(pca.ChildrenAsProperties, "ChildrenAsProperties"); Assert.AreEqual("mono", pca.DefaultProperty, "DefaultProperty"); Assert.IsTrue(pca.Equals(pca), "Equals"); Assert.IsFalse(pca.IsDefaultAttribute(), "IsDefaultAttribute"); Assert.IsTrue(pca.GetHashCode() != 0, "GetHashCode"); // likely #if NET_2_0 Assert.AreEqual(typeof(Control), pca.ChildControlType, "ChildControlType"); #endif }