예제 #1
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.InvokePartial();
        }
예제 #2
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();
            });
        }