示例#1
0
        public virtual void AfterExecution(ISpecContext context)
        {
            var reporter = new RequestReporter(_system);

            reporter.Append(Services.GetInstance <IRequestHistoryCache>().RecentReports().ToArray());

            context.Reporting.Log(reporter);
        }
示例#2
0
            public void AfterExecution(ISpecContext context)
            {
                var reporter    = new RequestReporter(_parent._runtime);
                var requestLogs =
                    GetService <IChainExecutionHistory>()
                    .RecentReports()
                    .Where(x => x.SessionTag == _sessionTag)
                    .ToArray();

                reporter.Append(requestLogs);

                context.Reporting.Log(reporter);

                if (_parent._runtime.Get <TransportSettings>().Enabled)
                {
                    var session = GetService <IMessagingSession>();
                    context.Reporting.Log(new MessageContextualInfoProvider(session));
                }


                _parent.afterEach(_parent._factory.Container, context);

                _parent._factory.TeardownScope();
            }