コード例 #1
0
        public void PlainValueAddsAttributeCorrectly()
        {
            EncodingType value = EncodingType.Plain;

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

            Assert.AreSame( builder, result );
            Assert.AreEqual( "text/plain", builder.Attributes[ HtmlAttributes.EncType ] );
        }
コード例 #2
0
        public void UrlEncodingValueAddsAttributeCorrectly()
        {
            EncodingType value = EncodingType.UrlEncoding;

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

            Assert.AreSame( builder, result );
            Assert.AreEqual( "application/x-www-form-urlencoded", builder.Attributes[ HtmlAttributes.EncType ] );
        }
コード例 #3
0
        public void MultipartValueAddsAttributeCorrectly()
        {
            EncodingType value = EncodingType.Multipart;

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

            Assert.AreSame( builder, result );
            Assert.AreEqual( "multipart/form-data", builder.Attributes[ HtmlAttributes.EncType ] );
        }