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

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

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

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

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

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

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