public void find_all_active_for_node() { foo1.Status = foo2.Status = bar1.Status = JobExecutionStatus.Scheduled; foo3.Status = bar2.Status = JobExecutionStatus.Inactive; thePersistence.Persist(new[] { foo1, foo2, foo3, bar1, bar2 }); thePersistence.FindAllActive("foo") .ShouldHaveTheSameElementsAs(foo1, foo2); thePersistence.FindAllActive("bar") .ShouldHaveTheSameElementsAs(bar1); }
public void SetUp() { runtime = FubuRuntime.BasicBus(); runtime.Get <IContainer>().UseInMemoryDatastore(); thePersistence = runtime.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 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 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 }); }