コード例 #1
0
 public void Eine_leere_Culture_passt_nicht()
 {
     IRouteConstraint routeConstraint = new CultureRouteConstraint();
     var values = new RouteValueDictionary { { RouteDataValue.Culture, "" } };
     Assert.IsFalse(routeConstraint.Match(null, null, RouteDataValue.Culture, values, RouteDirection.IncomingRequest));
 }
コード例 #2
0
 public void Culture_hat_einen_Bindestrich_passt()
 {
     IRouteConstraint routeConstraint = new CultureRouteConstraint();
     var values = new RouteValueDictionary { { RouteDataValue.Culture, "de-de" } };
     Assert.IsTrue(routeConstraint.Match(null, null, RouteDataValue.Culture, values, RouteDirection.IncomingRequest));
 }