public void WithNullNameDoesNotAddAttribute()
        {
            string name = null;
            string value = "Value";

            HtmlAttributeBuilder builder = new HtmlAttributeBuilder();
            var result = builder.Attribute( name, value );

            Assert.AreSame( builder, result );
            Assert.AreEqual( 0, builder.Attributes.Count );
        }
        public void WithWhiteSpaceNameDoesNotAddAttribute()
        {
            string name = " ";
            string value = "Value";

            HtmlAttributeBuilder builder = new HtmlAttributeBuilder();
            var result = builder.Attribute( name, value );

            Assert.AreSame( builder, result );
            Assert.IsFalse( builder.Attributes.ContainsKey( name ) );
        }
        public void AddsAttributeCorrectly()
        {
            string name = "Name";
            string value = "Value";

            HtmlAttributeBuilder builder = new HtmlAttributeBuilder();
            var result = builder.Attribute( name, value );

            Assert.AreSame( builder, result );
            Assert.AreEqual( value, builder.Attributes[ name ] );
        }