public void DefaultType () { ToolboxItemAttribute attr = new ToolboxItemAttribute (true); Type toolboxItemType = typeof(global::System.Drawing.Design.ToolboxItem); Assert.AreEqual (toolboxItemType.AssemblyQualifiedName, attr.ToolboxItemTypeName, "#1"); Assert.AreEqual (toolboxItemType, attr.ToolboxItemType, "#2"); Assert.AreEqual (true, attr.IsDefaultAttribute (), "#3"); Assert.AreEqual (attr.ToolboxItemTypeName.GetHashCode (), attr.GetHashCode (), "#4"); Assert.AreEqual (toolboxItemType.AssemblyQualifiedName, ToolboxItemAttribute.Default.ToolboxItemTypeName, "#5"); Assert.AreEqual (toolboxItemType, ToolboxItemAttribute.Default.ToolboxItemType, "#2"); Assert.AreEqual (true, ToolboxItemAttribute.Default.IsDefaultAttribute (), "#3"); Assert.AreEqual (ToolboxItemAttribute.Default.ToolboxItemTypeName.GetHashCode (), attr.GetHashCode (), "#4"); }
public void Equals_Other_ReturnsExpected(ToolboxItemAttribute attribute, object other, bool expected) { Assert.Equal(expected, attribute.Equals(other)); if (other is ToolboxItemAttribute) { Assert.Equal(expected, attribute.GetHashCode().Equals(other.GetHashCode())); } }