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 Ctor_Deny_Unrestricted() { ParseChildrenAttribute pca = new ParseChildrenAttribute(); Assert.IsFalse(pca.ChildrenAsProperties, "ChildrenAsProperties"); Assert.AreEqual(String.Empty, pca.DefaultProperty, "DefaultProperty"); Assert.IsTrue(pca.Equals(pca), "Equals"); Assert.IsTrue(pca.IsDefaultAttribute(), "IsDefaultAttribute"); // this throws a NullReferenceException on MS 2.0 beta2 // Assert.IsTrue (pca.GetHashCode () != 0, "GetHashCode"); // likely Assert.AreEqual(typeof(Control), 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 }