Esempio n. 1
0
 public void InBoundUrl_WithGetMethod_AndNoParam_IsRoutedTo_ActionWithNullArg()
 {
     Expression<Func<SkinsController, ActionResult>> action =
        controller => controller.Sample(null);
     var url = new SkinsRouter.SampleRoute().AlternateUrls.Single().ToAppRelativeUrl();
     url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
 }
Esempio n. 2
0
 public void InBoundUrl_WithGetMethod_AndNonEmptyParam_IsRoutedTo_ActionWithNonEmptyArg()
 {
     const string content = "sample-content";
     Expression<Func<SkinsController, ActionResult>> action =
        controller => controller.Sample(content);
     var url = new SkinsRouter.SampleRoute().Url.ToAppRelativeUrl()
         .Replace("{content}", content);
     url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
 }