public void WithFalseRemovesAttributeIfPresent()
        {
            HtmlAttributeBuilder builder = new HtmlAttributeBuilder();
            var result = builder.AutoFocus( true ).AutoFocus( false );

            Assert.AreSame( builder, result );
            Assert.IsFalse( builder.Attributes.ContainsKey( HtmlAttributes.AutoFocus ) );
        }
        public void AddsAttributeCorrectly()
        {
            HtmlAttributeBuilder builder = new HtmlAttributeBuilder();
            var result = builder.AutoFocus();

            Assert.AreSame( builder, result );
            Assert.AreEqual( HtmlAttributes.AutoFocus, builder.Attributes[ HtmlAttributes.AutoFocus ] );
        }
        public void WithTrueAddsAttributeCorrectly()
        {
            bool value = true;

            HtmlAttributeBuilder builder = new HtmlAttributeBuilder();
            var result = builder.AutoFocus( value );

            Assert.AreSame( builder, result );
            Assert.AreEqual( HtmlAttributes.AutoFocus, builder.Attributes[ HtmlAttributes.AutoFocus ] );
        }
        public void WithFalseDoesNotAddAttribute()
        {
            bool value = false;

            HtmlAttributeBuilder builder = new HtmlAttributeBuilder();
            var result = builder.AutoFocus( value );

            Assert.AreSame( builder, result );
            Assert.IsFalse( builder.Attributes.ContainsKey( HtmlAttributes.AutoFocus ) );
        }