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

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

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

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

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

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

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