public async Task CreateAsync_AccessRightsNotManage_DoesNotCreateTopicOrSubscription(AccessRights accessRights)
        {
            ServiceBusAccount account = new ServiceBusAccount();
            Mock <ITriggeredFunctionExecutor>     mockExecutor = new Mock <ITriggeredFunctionExecutor>(MockBehavior.Strict);
            ServiceBusSubscriptionListenerFactory factory      = new ServiceBusSubscriptionListenerFactory(account, "testtopic", "testsubscription", mockExecutor.Object, accessRights, new ServiceBusConfiguration());

            IListener listener = await factory.CreateAsync(CancellationToken.None);

            Assert.NotNull(listener);
        }
        public async Task CreateAsync__Success()
        {
            var config  = new ServiceBusConfiguration();
            var account = new ServiceBusAccount(config);
            Mock <ITriggeredFunctionExecutor>     mockExecutor = new Mock <ITriggeredFunctionExecutor>(MockBehavior.Strict);
            ServiceBusSubscriptionListenerFactory factory      = new ServiceBusSubscriptionListenerFactory(account, "testtopic", "testsubscription", mockExecutor.Object, config);

            IListener listener = await factory.CreateAsync(CancellationToken.None);

            Assert.NotNull(listener);
        }
        public async Task CreateAsync_Success()
        {
            var configuration = new ConfigurationBuilder()
                                .AddEnvironmentVariables()
                                .Build();
            var config = new ServiceBusOptions
            {
                ConnectionString = configuration.GetWebJobsConnectionString("ServiceBus")
            };

            var messagingProvider = new MessagingProvider(new OptionsWrapper <ServiceBusOptions>(config));

            var account = new ServiceBusAccount(config, configuration);
            Mock <ITriggeredFunctionExecutor>     mockExecutor = new Mock <ITriggeredFunctionExecutor>(MockBehavior.Strict);
            ServiceBusSubscriptionListenerFactory factory      = new ServiceBusSubscriptionListenerFactory(account, "testtopic", "testsubscription", mockExecutor.Object, config, messagingProvider);

            IListener listener = await factory.CreateAsync(CancellationToken.None);

            Assert.NotNull(listener);
        }