public void WithExpressionReturnsCorrectly()
        {
            var viewModel = new UrlViewModel( "http://www.example.com" );

            HtmlHelper<UrlViewModel> htmlHelper = HtmlHelperGenerator.CreateHtmlHelper( viewModel );

            var result = htmlHelper.UrlFor( x => x.UrlAsString );

            string expectedResult = string.Format( "<input id=\"UrlAsString\" name=\"UrlAsString\" type=\"url\" value=\"{0}\" />", viewModel.UrlAsString );
            Assert.AreEqual( expectedResult, result.ToHtmlString() );
        }
        public void WithExpressionAndHtmlAttributesDictionaryReturnsCorrectly()
        {
            var viewModel = new UrlViewModel( "http://www.example.com" );
            string attributeName = "attributeName";
            string attributeValue = "attributeValue";

            Dictionary<string, object> htmlAttributes = new Dictionary<string, object>();
            htmlAttributes.Add( attributeName, attributeValue );

            HtmlHelper<UrlViewModel> htmlHelper = HtmlHelperGenerator.CreateHtmlHelper( viewModel );

            var result = htmlHelper.UrlFor( x => x.UrlAsString, htmlAttributes );

            string expectedResult = string.Format( "<input {0}=\"{1}\" id=\"UrlAsString\" name=\"UrlAsString\" type=\"url\" value=\"{2}\" />", attributeName, attributeValue, viewModel.UrlAsString );
            Assert.AreEqual( expectedResult, result.ToHtmlString() );
        }