public void should_append_behavioral_node_to_void_end_point_attributed_calls()
 {
     var token = new WebFormViewToken(typeof(FakeView));
     var actions = _graph.Actions().Where(x => !x.HasAnyOutputBehavior()
         && x.Method.HasAttribute<WebFormsEndpointAttribute>()).ToList();
     for (int index = 0; index < actions.Count; index++)
     {
         var call = actions[index];
         call.LastOrDefault().ShouldBeTheSameAs(token.ToBehavioralNode());
     }
 }
Exemplo n.º 2
0
 public void Configure(BehaviorGraph graph)
 {
     graph.Actions()
     .Where(x => !x.HasAnyOutputBehavior())
     .Each(x => x.Method.ForAttribute <WebFormsEndpointAttribute>(att =>
     {
         var token = new WebFormViewToken(att.ViewType);
         x.AddToEnd(token.ToBehavioralNode());
         graph.Observer.RecordCallStatus(x,
                                         "Action '{0}' has {1} declared, using WebForms view '{2}'".ToFormat(
                                             x.Description, typeof(WebFormsEndpointAttribute).Name, token));
     }));
 }
Exemplo n.º 3
0
        public override void Alter(ActionCall call)
        {
            var token = new WebFormViewToken(ViewType);
            call.ParentChain().AddToEnd(token.ToBehavioralNode());

            // TODO -- add some tracing back here.
            /*
             *
                    graph.Observer.RecordCallStatus(x,
                      "Action '{0}' has {1} declared, using WebForms view '{2}'".ToFormat(
                        x.Description, typeof(WebFormsEndpointAttribute).Name, token));
             *
             */
        }
 public void observer_should_record_call_status()
 {
     var token = new WebFormViewToken(typeof(FakeView));
     var actions = _graph.Actions().Where(x => !x.HasAnyOutputBehavior()
         && x.Method.HasAttribute<WebFormsEndpointAttribute>()).ToList();
     for (int index = 0; index < actions.Count; index++)
     {
         var call = actions[index];
         _observer.AssertWasCalled(o => o.RecordCallStatus(Arg<ActionCall>.Is.Equal(call),
             Arg<string>.Matches(s => s.Contains(
                 "Action '{0}' has {1} declared, using WebForms view '{2}'"
                 .ToFormat(call.Description, "WebFormsEndpointAttribute", token)))));
     }
 }
Exemplo n.º 5
0
        public override void Alter(ActionCall call)
        {
            var token = new WebFormViewToken(ViewType);

            call.ParentChain().AddToEnd(token.ToBehavioralNode());

            // TODO -- add some tracing back here.

            /*
             *
             *      graph.Observer.RecordCallStatus(x,
             *        "Action '{0}' has {1} declared, using WebForms view '{2}'".ToFormat(
             *          x.Description, typeof(WebFormsEndpointAttribute).Name, token));
             *
             */
        }
Exemplo n.º 6
0
 public void SetUp()
 {
     type = typeof (View4);
     token = new WebFormViewToken(type);
 }
Exemplo n.º 7
0
 public override void Alter(ActionCall call)
 {
     var webFormToken = new WebFormViewToken(ViewType);
     call.ParentChain().Output.AddView(webFormToken);
 }