Exemple #1
0
        public void SetUp()
        {
            runtime = FubuTransport.DefaultPolicies().StructureMap().Bootstrap();
            runtime.Factory.Get <IContainer>().UseInMemoryDatastore();

            persistence = runtime.Factory.Get <RavenDbSubscriptionPersistence>();
        }
Exemple #2
0
        public void SetUp()
        {
            runtime = FubuTransport.DefaultPolicies().StructureMap().Bootstrap();
            runtime.Factory.Get <IContainer>().UseInMemoryDatastore();

            thePersistence = runtime.Factory.Get <RavenDbSchedulePersistence>();

            foo1 = new JobStatusDTO {
                JobKey = "1", NodeName = "foo"
            };
            foo2 = new JobStatusDTO {
                JobKey = "2", NodeName = "foo"
            };
            foo3 = new JobStatusDTO {
                JobKey = "3", NodeName = "foo"
            };
            bar1 = new JobStatusDTO {
                JobKey = "1", NodeName = "bar"
            };
            bar2 = new JobStatusDTO {
                JobKey = "2", NodeName = "bar"
            };

            thePersistence.Persist(new[] { foo1, foo2, foo3, bar1, bar2 });
        }
 public void the_job_is_registered()
 {
     using (var runtime = FubuTransport.DefaultPolicies().StructureMap().Bootstrap())
     {
         runtime.Factory.Get <IPollingJobs>().Any(x => x is PollingJob <HealthMonitorPollingJob, HealthMonitoringSettings>)
         .ShouldBeTrue();
     }
 }
 public void SubscriptionHandler_should_be_part_of_the_application()
 {
     using (var runtime = FubuTransport.DefaultPolicies().StructureMap().Bootstrap())
     {
         var graph = runtime.Factory.Get <HandlerGraph>();
         graph.ChainFor(typeof(SubscriptionRequested)).ShouldNotBeNull();
         graph.ChainFor(typeof(SubscriptionsChanged)).ShouldNotBeNull();
     }
 }
        public void do_not_blow_up()
        {
            var container = new Container();

            container.Inject(new LightningQueueSettings
            {
                DisableIfNoChannels = true
            });

            using (var runtime = FubuTransport.DefaultPolicies().StructureMap(container).Bootstrap())
            {
                // just looking for the absence of an exception here
            }
        }
        public void does_blow_up_if_not_opted_into_the_disable_behavior()
        {
            var container = new Container();

            container.Inject(new LightningQueueSettings
            {
                DisableIfNoChannels = false
            });

            Exception <FubuException> .ShouldBeThrownBy(() => {
                using (var runtime = FubuTransport.DefaultPolicies().StructureMap(container).Bootstrap())
                {
                }
            });
        }