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(); }
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; }
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(); }); }
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; }
public BehaviorFinish(BehaviorCorrelation correlation) { _correlation = correlation; }