public void Init()
        {
            fixture = new Fixture();

            queue = new BlockingCollection<Span>();
            clientProvider = MockRepository.GenerateStub<IClientProvider>();
            testMaxBatchSize = 10;
            spanProcessor = new SpanProcessor(queue, clientProvider, testMaxBatchSize);
            taskFactory = MockRepository.GenerateStub<SpanProcessorTaskFactory>();
            spanProcessor.spanProcessorTaskFactory = taskFactory;
        }
 public void CTOR_WithNullClientProvider()
 {
     var spanProcessor = new SpanProcessor(new BlockingCollection<Span>(), null, fixture.Create<int>());
 }
 public void CTOR_WithNullSpanQueue()
 {
     var spanProcessor = new SpanProcessor(null, MockRepository.GenerateStub<IClientProvider>(), fixture.Create<int>());
 }
 private bool ValidateStartAction(Action y, SpanProcessor spanProcessor)
 {
     Assert.AreEqual(() => spanProcessor.LogSubmittedSpans(), y);
     return true;
 }
        private void SetupSpanCollector()
        {
            clientProviderStub = MockRepository.GenerateStub<IClientProvider>();
            spanCollector = new SpanCollector(clientProviderStub, 0);

            SpanCollector.spanQueue = fixture.Create<BlockingCollection<Span>>();
            spanProcessorStub = MockRepository.GenerateStub<SpanProcessor>(SpanCollector.spanQueue, clientProviderStub, 0);
            spanCollector.spanProcessor = spanProcessorStub;
        }