public void RejectsCrap() { var responseTypeConstraint = new ResponseTypeConstraint(); var match = responseTypeConstraint.Match(null, null, "responseType", new RouteValueDictionary(new { responseType = "Crap" }), RouteDirection.IncomingRequest); Assert.IsFalse(match); }
public void AcceptsXml() { var responseTypeConstraint = new ResponseTypeConstraint(); var match = responseTypeConstraint.Match(null, null, "responseType", new RouteValueDictionary(new { responseType = "Xml" }), RouteDirection.IncomingRequest); Assert.IsTrue(match); }