protected override ISampleEndpoint GetSampleEndpointForRecording()
 {
     ISampleEndpoint advicedSampleEndpoint = new SampleEndpoint();
     ICallCommandRepository callCommandRepository = CreateCallFileRepository();
     ICallRecorder callRecorder = new CallRecorder(callCommandRepository) { Enabled = true };
     return new SampleEndpointRecordingAdvice(advicedSampleEndpoint, callRecorder);
 }
 protected virtual ISampleEndpoint GetSampleEndpointForStubbing()
 {
     var advicedSampleEndpoint = new SampleEndpoint();
     var callQueryRepository = CreateCallFileRepository();
     var callStubber = new CallStubber(callQueryRepository) { Enabled = RecordingAndStubbingEnabled };
     return new SampleEndpointStubbingAdvice(advicedSampleEndpoint, callStubber);
 }
 protected override ISampleEndpoint GetSampleEndpointForRecording()
 {
     var advicedSampleEndpoint = new SampleEndpoint();
     var callCommandRepository = CreateCallFileRepository();
     var callRecorder = new CallRecorder(callCommandRepository) { Enabled = RecordingAndStubbingEnabled };
     return new SampleEndpointRecordingAdvice(advicedSampleEndpoint, callRecorder);
 }
        public void ShouldThrowExceptionWhenThrowExceptionIsTrue()
        {
            var sampleEndpoint = new SampleEndpoint { ThrowException = true };

            Assert.That(() => sampleEndpoint.SampleMethod(null), Throws.Exception);
        }
        public void ShouldNotThrowExceptionWhenThrowExceptionIsFalse()
        {
            var sampleEndpoint = new SampleEndpoint {ThrowException = false };

            Assert.That(() => sampleEndpoint.SampleMethod(null), Throws.Nothing);
        }