Exemplo n.º 1
0
        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)))));
            }
        }