private void logStartAndFinish(double start, double finish)
        {
            var correlation = new BehaviorCorrelation(theNode);

            theLog.AddLog(start, new BehaviorStart(correlation));
            theLog.AddLog(finish, new BehaviorFinish(correlation));
        }
        protected override void beforeEach()
        {
            logs        = Services.RecordLogging();
            correlation = new BehaviorCorrelation(new FakeNode());
            Services.Inject(correlation);

            inner = MockFor <IActionBehavior>();
            ClassUnderTest.Inner = inner;

            ClassUnderTest.InvokePartial();
        }
Beispiel #3
0
        protected override void beforeEach()
        {
            logs        = Services.RecordLogging();
            correlation = new BehaviorCorrelation(new FakeNode());
            Services.Inject(correlation);
            Services.Inject <IExceptionHandlingObserver>(new ExceptionHandlingObserver());

            exception = new NotImplementedException();
            inner     = MockFor <IActionBehavior>();
            inner.Expect(x => x.InvokePartial()).Throw(exception);

            ClassUnderTest.Inner = inner;
        }
Beispiel #4
0
        protected override void beforeEach()
        {
            logs = new RecordingRequestTrace();
            Services.Inject <IRequestTrace>(logs);

            correlation = new BehaviorCorrelation(new FakeNode());
            Services.Inject(correlation);

            inner = MockFor <IActionBehavior>();
            ClassUnderTest.Inner = inner;

            ClassUnderTest.Invoke();
        }
        private void hasAnExceptionAgainstTheNode()
        {
            var correlation = new BehaviorCorrelation(theNode);



            theLog.AddLog(10, new BehaviorStart(correlation));
            theLog.AddLog(12, new ExceptionReport("bad", new Exception())
            {
                CorrelationId = theNode.UniqueId
            });
            theLog.AddLog(15, new BehaviorFinish(correlation));
        }
        protected override void beforeEach()
        {
            logs        = Services.RecordLogging();
            correlation = new BehaviorCorrelation(new FakeNode());
            Services.Inject(correlation);
            Services.Inject <IExceptionHandlingObserver>(new ExceptionHandlingObserver());

            exception = new NotImplementedException();
            inner     = MockFor <IActionBehavior>();
            inner.Expect(x => x.InvokePartial()).Throw(exception);
            MockFor <IDebugDetector>().Stub(x => x.IsDebugCall()).Return(true);

            ClassUnderTest.Inner = inner;

            Exception <NotImplementedException> .ShouldBeThrownBy(() =>
            {
                ClassUnderTest.InvokePartial();
            });
        }
Beispiel #7
0
        protected override void beforeEach()
        {
            logs = new RecordingRequestTrace();
            Services.Inject <IRequestTrace>(logs);

            correlation = new BehaviorCorrelation(new FakeNode());
            Services.Inject(correlation);
            Services.Inject <IExceptionHandlingObserver>(new ExceptionHandlingObserver());

            exception = new NotImplementedException();
            inner     = MockFor <IActionBehavior>();
            inner.Expect(x => x.Invoke()).Throw(exception);

            ClassUnderTest.Inner = inner;

            Exception <NotImplementedException> .ShouldBeThrownBy(() =>
            {
                ClassUnderTest.Invoke();
            });
        }
 public BehaviorStart(BehaviorCorrelation correlation)
 {
     _correlation = correlation;
 }
Beispiel #9
0
 public BehaviorFinish(BehaviorCorrelation correlation)
 {
     _correlation = correlation;
 }