public void EndServerSpan()
        {
            var tracerClient = SetupZipkinClient();
            var zipkinClient = (ZipkinClient)tracerClient;

            spanTracerStub          = GetSpanTracerStub();
            zipkinClient.spanTracer = spanTracerStub;
            var serverSpan = new Span();

            tracerClient.EndServerTrace(serverSpan);

            spanTracerStub.AssertWasCalled(x => x.SendServerSpan(serverSpan));
        }
        public void EndClientSpan()
        {
            var returnCode   = fixture.Create <short>();
            var tracerClient = SetupZipkinClient();
            var zipkinClient = (ZipkinClient)tracerClient;

            spanTracerStub          = GetSpanTracerStub();
            zipkinClient.spanTracer = spanTracerStub;
            var clientSpan = new Span();

            tracerClient.EndClientTrace(clientSpan, returnCode);

            spanTracerStub.AssertWasCalled(x => x.ReceiveClientSpan(clientSpan, returnCode));
        }
        public void EndClientSpan()
        {
            var tracerClient = SetupZipkinClient();
            var zipkinClient = (ZipkinClient)tracerClient;

            spanTracerStub          = MockRepository.GenerateStub <SpanTracer>(spanCollectorStub, fixture.Create <string>(), MockRepository.GenerateStub <ServiceEndpoint>());
            zipkinClient.spanTracer = spanTracerStub;
            zipkinClient.clientSpan = new Span();

            var expectedDuration = fixture.Create <int>();

            tracerClient.EndClientTrace(expectedDuration);

            spanTracerStub.AssertWasCalled(x => x.ReceiveClientSpan(zipkinClient.clientSpan, expectedDuration));
        }
        public void EndClientSpan()
        {
            var tracerClient = SetupZipkinClient();
            var zipkinClient = (ZipkinClient)tracerClient;
            spanTracerStub = MockRepository.GenerateStub<SpanTracer>(spanCollectorStub, fixture.Create<string>(), MockRepository.GenerateStub<ServiceEndpoint>());
            zipkinClient.spanTracer = spanTracerStub;
            zipkinClient.clientSpan = new Span();

            var expectedDuration = fixture.Create<int>();

            tracerClient.EndClientTrace(expectedDuration);

            spanTracerStub.AssertWasCalled(x => x.ReceiveClientSpan(zipkinClient.clientSpan, expectedDuration));
        }