コード例 #1
0
        private bool IsAiringIdDelvieredToQueue()
        {
            IQueueService queueService  = _fixture.Container.GetInstance <IQueueService>();
            var           deliveryQueue = queueService.GetByApiKey(_tbsQueueKey);

            if (deliveryQueue == null)
            {
                Assert.True(false, string.Format("Unit test delivery queue not found: API Key {0}", _tbsQueueKey));
            }
            queueService.Unlock(deliveryQueue.Name);
            _publisher.Execute(deliveryQueue.Name);

            IAiringService airingService = _fixture.Container.GetInstance <IAiringService>();

            var airing = airingService.GetBy(_airingId);

            return(airing.DeliveredTo.Contains(_tbsQueueKey));
        }
コード例 #2
0
        public void VerifyClientQueueDelivery()
        {
            if (!_processedAirings.Any())
            {
                Assert.True(false, "No airing found to run the pubslisher job");
            }

            IQueueService queueService = _fixture.Container.GetInstance <IQueueService>();

            var queues = _processedAirings.SelectMany(e => e.ExpectedQueues.ToArray()).Distinct().ToList();

            queues.AddRange(_processedAirings.SelectMany(e => e.UnExpectedQueues.ToArray()).Distinct().ToList());

            queues = queues.Distinct().ToList();

            foreach (var queue in queues)
            {
                var deliveryQueue = queueService.GetByApiKey(queue);

                if (deliveryQueue == null)
                {
                    Assert.True(false, string.Format("Unit test delivery queue not found: API Key {0}", queue));
                }

                queueService.Unlock(deliveryQueue.Name);

                _publisher.Execute(deliveryQueue.Name);
            }

            ProhibitResendMediaIdTest();

            ActiveAiringDeliveryTest();

            ExpiredAiringDelieryTest();

            PriorityQueueTest();
        }
コード例 #3
0
ファイル: Publisher.cs プロジェクト: nirmalasubu/sample
 public void Execute(string queueName)
 {
     publisher.Execute(queueName);
 }