コード例 #1
0
        public void methods_that_return_a_json_message_should_output_json()
        {
            BehaviorChain chain = chainFor(x => x.OutputJson1());

            chain.Any(x => x.GetType() == typeof(RenderJsonNode)).ShouldBeTrue();
            chainFor(x => x.OutputJson2()).Any(x => x.GetType() == typeof(RenderJsonNode)).ShouldBeTrue();
            chainFor(x => x.OutputJson3()).Any(x => x.GetType() == typeof(RenderJsonNode)).ShouldBeTrue();
        }
コード例 #2
0
        public void SetUp()
        {
            theChain      = BehaviorChain.For <ActionJackson>(x => x.OneInOneOut(null));
            theOutputNode = new OutputNode(typeof(OutputBehavior));

            theChain.AddToEnd(theOutputNode);

            // Nothing up my sleeve
            theChain.Any(x => x is ConnegNode).ShouldBeFalse();
        }
コード例 #3
0
        public void SetUp()
        {
            theChain = BehaviorChain.For<ActionJackson>(x => x.OneInOneOut(null));
            theOutputNode = new OutputNode(typeof(OutputBehavior));

            theChain.AddToEnd(theOutputNode);

            // Nothing up my sleeve
            theChain.Any(x => x is ConnegNode).ShouldBeFalse();
        }
コード例 #4
0
 public void do_not_attach_the_authorization_node_if_there_are_no_authorization_rules_for_a_chain()
 {
     moveChain.Any(x => x is AuthorizationNode).ShouldBeFalse();
 }