public void NonMatching(string input, string pattern) { var router = new Router <int>(new MatchingRoutesSelectionStrategy <int>()); router.Register("", RouterPatternParser.Parse(pattern), 1); var result = router.Match(CreateMessage(input)); Assert.Empty(result); }
public void Run(string left, string right, int expected) { var comparer = new RouteScoreComparer(); var result = comparer.Compare( RouterPatternParser.Parse(left), RouterPatternParser.Parse(right) ); Assert.Equal(expected, result); }
public MessageRouteAttribute(string route) : this(RouterPatternParser.Parse(route)) { }