コード例 #1
0
        public void MatchShouldInvokeHigherPriorityNodesFirst()
        {
            this.matcher.Priority.Returns(100);
            IMatchNode important = Substitute.For <IMatchNode>();

            important.Priority.Returns(200);
            important.Match(default(StringSegment))
            .ReturnsForAnyArgs(new NodeMatchResult(null, null));
            this.node.Add(new[] { important }, 0, null);

            this.node.Match("/route");

            important.ReceivedWithAnyArgs().Match(default(StringSegment));
            this.matcher.DidNotReceiveWithAnyArgs().Match(default(StringSegment));
        }