Beispiel #1
0
 public void CaptureDebug_GivenDebugBatchSize_ShouldCallCaptureForDebugBatch()
 {
     //---------------Set up test pack-------------------
     var customerCapturer = Substitute.For<ICustomerCapturer>();
     var debugCapturer = new DebugCapturer(customerCapturer);
     var customers = CreateCustomers(50);
     const int normalBatchSize = 150000;
     const int debugBatchSize = 20;
     //---------------Assert Precondition----------------
     //---------------Execute Test ----------------------
     debugCapturer.CaptureDebug(customers, "stuff", normalBatchSize, debugBatchSize);
     //---------------Test Result -----------------------
     customerCapturer.Received().Capture(customers, "stuff.debug", debugBatchSize);
 }
Beispiel #2
0
        public void CaptureDebug_GivenDebugBatchSize_ShouldCallCaptureForDebugBatch()
        {
            //---------------Set up test pack-------------------
            var       customerCapturer = Substitute.For <ICustomerCapturer>();
            var       debugCapturer    = new DebugCapturer(customerCapturer);
            var       customers        = CreateCustomers(50);
            const int normalBatchSize  = 150000;
            const int debugBatchSize   = 20;

            //---------------Assert Precondition----------------
            //---------------Execute Test ----------------------
            debugCapturer.CaptureDebug(customers, "stuff", normalBatchSize, debugBatchSize);
            //---------------Test Result -----------------------
            customerCapturer.Received().Capture(customers, "stuff.debug", debugBatchSize);
        }