public void the_named_uri_parameter_not_matching_a_registered_view_is_ignored_and_the_default_is_used()
 {
     WebFormsCodec.GetViewVPath(
         new { index = "page.aspx", view2 = "anotherpage.aspx" }.ToCaseInvariantDictionary(),
         null, "view1")
     .ShouldBe("page.aspx");
 }
 public void the_last_codec_parameter_is_used()
 {
     WebFormsCodec.GetViewVPath(
         new { view1 = "page.aspx", view2 = "anotherpage.aspx" }.ToCaseInvariantDictionary(),
         new[] { "view1", "view2" }, null)
     .ShouldBe("anotherpage.aspx");
 }
 public void the_uri_name_is_used_to_select_the_view()
 {
     WebFormsCodec.GetViewVPath(
         new { view1 = "page.aspx", view2 = "anotherpage.aspx" }.ToCaseInvariantDictionary(),
         null, "view1")
     .ShouldBe("page.aspx");
 }
 public void an_unrecognized_view_name_is_not_selecting_the_default()
 {
     WebFormsCodec.GetViewVPath(
         new { index = "page.aspx" }.ToCaseInvariantDictionary(),
         new[] { "view1" }, null)
     .ShouldBeNull();
 }
 public void the_default_view_is_used_for_unrecognized_view_names()
 {
     WebFormsCodec.GetViewVPath(
         new { index = "page.aspx" }.ToCaseInvariantDictionary(),
         new[] { "NewsTopics" },
         "NewsTopics")
     .ShouldBe("page.aspx");
 }
 public void the_matching_on_codec_parameter_is_case_insensitive()
 {
     WebFormsCodec.GetViewVPath(new { View1 = "page.aspx" }.ToCaseInvariantDictionary(), new[] { "view1" }, null)
     .ShouldBe("page.aspx");
 }
 public void the_page_is_not_found_when_there_is_no_renderer_parameter()
 {
     WebFormsCodec.GetViewVPath(new Dictionary <string, string>(), null, null)
     .ShouldBeNull();
 }
 public void IfThereIsNoRequestParametersAndNoIndexThePageWillNotBeRendered()
 {
     WebFormsCodec.GetViewVPath(
         new { notanindex = "page.aspx", notanindexeither = "anotherpage.aspx" }.ToCaseInvariantDictionary(), null, null)
     .ShouldBeNull();
 }
 public void the_first_page_with_a_name_of_index_is_selected()
 {
     WebFormsCodec.GetViewVPath(
         new { notanindex = "page.aspx", index = "anotherpage.aspx" }.ToCaseInvariantDictionary(), null, null)
     .ShouldBe("anotherpage.aspx");
 }