public void SetUp() { registry = new FubuRegistry(x => { x.Actions.IncludeType<TestController>(); }); container = new Container(x => { x.For<ICurrentChain>().Use(new CurrentChain(null, null)); x.For<IHttpRequest>().Use(OwinHttpRequest.ForTesting()); }); registry.StructureMap(container); registry.RootPath = AppDomain.CurrentDomain.BaseDirectory; fubuRuntime = registry.ToRuntime(); routes = fubuRuntime .Routes .Where(r => !r.As<Route>().Url.StartsWith("_content")) .ToList(); container.Configure(x => x.For<IOutputWriter>().Use(new InMemoryOutputWriter())); }
public void SetUp() { registry = new FubuRegistry(); container = new Lazy<IContainer>(() => { var c = new Container(x => { x.For<ISettingsProvider>().Use<SettingsProvider>(); x.For<ISettingsSource>().Add<FakeSettingsData>(); x.For<ISettingsSource>().Add(new AppSettingsSettingSource(SettingCategory.core)); }); registry.StructureMap(c); registry.ToRuntime(); return c; }); }
public void SetUp() { container = new Container(); container.Inject(new TransportSettings { DelayMessagePolling = Int32.MaxValue, ListenerCleanupPolling = Int32.MaxValue }); theServiceBus = MockRepository.GenerateMock<IServiceBus>(); var registry = new FubuRegistry(); registry.ServiceBus.Enable(true); registry.Actions.IncludeType<MessageOnePublisher>(); registry.StructureMap(container); registry.AlterSettings<LightningQueueSettings>(x => x.DisableIfNoChannels = true); theRuntime = registry.ToRuntime(); theGraph = theRuntime.Get<BehaviorGraph>(); chain = theGraph.ChainFor<MessageOnePublisher>(x => x.post_message1(null)); container.Inject(theServiceBus); }