public void AddsAttributeCorrectly() { string script = "Script"; var attributes = new AttributeCollection(); var builder = new EventAttributeBuilder( attributes ); var result = builder.OnKeyPress( script ); Assert.AreSame( builder, result ); Assert.AreEqual( script, attributes[ HtmlAttributes.Events.OnKeyPress ] ); }