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

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

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

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

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

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

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