private SubscriptionManager GetSubscriptionManager(SubscribeOption subscribe)
        {
            var workQueue = new Mock <IQueue>();

            workQueue.Setup(m => m.Uri).Returns(new Uri(WorkQueueUri));

            var serviceBusConfiguration = new ServiceBusConfiguration
            {
                Inbox = new InboxQueueConfiguration
                {
                    WorkQueue = workQueue.Object
                }
            };
            var subscriptionConfiguration = SubscriptionSection.Configuration();

            subscriptionConfiguration.Subscribe = subscribe;

            var serviceBusEvents = new ServiceBusEvents();

            var subscriptionManager = new SubscriptionManager(serviceBusEvents,
                                                              serviceBusConfiguration, subscriptionConfiguration,
                                                              new ScriptProvider(new ScriptProviderConfiguration()), DatabaseContextFactory, DatabaseGateway);

            serviceBusEvents.OnStarted(this, new PipelineEventEventArgs(new Mock <IPipelineEvent>().Object));

            return(subscriptionManager);
        }
Example #2
0
        public void Should_be_able_to_get_configuration()
        {
            var configuration = SubscriptionSection.Configuration();

            Assert.IsNotNull(configuration);
        }