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

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

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

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

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

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

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