public void matches_negative_with_one_action()
        {
            var chain = new BehaviorChain();
            chain.AddToEnd(ActionCall.For<ActionEndpoint>(x => x.get_hello()));

            var match = new LastActionMatch(call => call.Method.Name.EndsWith("HTML"));
            match.Matches(chain).ShouldBeFalse();
        }
        public void but_does_match_the_last_call()
        {
            var chain = new BehaviorChain();
            chain.AddToEnd(ActionCall.For<ActionEndpoint>(x => x.get_hello()));
            chain.AddToEnd(ActionCall.For<ActionEndpoint>(x => x.SaySomethingHTML()));

            var match = new LastActionMatch(call => call.Method.Name.EndsWith("HTML"));
            match.Matches(chain).ShouldBeTrue();
        }
        public void matches_positive_with_one_action()
        {
            var chain = new BehaviorChain();
            chain.AddToEnd(ActionCall.For<ActionEndpoint>(x => x.SaySomethingHTML()));

            var match = new LastActionMatch(call => call.Method.Name.EndsWith("HTML"));
            match.Matches(chain).ShouldBeTrue();
        }
 public void does_not_blow_up_with_no_chains()
 {
     var match = new LastActionMatch(call => call.Method.Name.EndsWith("HTML"));
     match.Matches(new BehaviorChain()).ShouldBeFalse();
 }