public void remote_testing_mode() { FubuMode.SetupForTestingMode(); FubuMode.RemoveTestingMode(); FubuMode.InTestingMode().ShouldBeFalse(); }
public FubuTransportServiceRegistry() { var eventAggregatorDef = FubuTransport.UseSynchronousLogging ? ObjectDef.ForType <SynchronousEventAggregator>() : ObjectDef.ForType <EventAggregator>(); eventAggregatorDef.IsSingleton = true; SetServiceIfNone(typeof(IEventAggregator), eventAggregatorDef); var stateCacheDef = new ObjectDef(typeof(SagaStateCacheFactory)); stateCacheDef.IsSingleton = true; SetServiceIfNone(typeof(ISagaStateCacheFactory), stateCacheDef); SetServiceIfNone <IChainInvoker, ChainInvoker>(); SetServiceIfNone <IEnvelopeSender, EnvelopeSender>(); AddService <IMessageSerializer, XmlMessageSerializer>(); AddService <IActivator, FubuTransportationActivator>(); SetServiceIfNone <IServiceBus, ServiceBus>(); SetServiceIfNone <IEnvelopeSerializer, EnvelopeSerializer>(); SetServiceIfNone <IHandlerPipeline, HandlerPipeline>(); AddService <ILogListener, EventAggregationListener>(); if (FubuTransport.ApplyMessageHistoryWatching || FubuMode.InTestingMode()) { AddService <IListener, MessageWatcher>(); var def = ObjectDef.ForType <MessagingSession>(); def.IsSingleton = true; SetServiceIfNone(typeof(IMessagingSession), def); AddService <ILogListener, MessageRecordListener>(); } if (FubuMode.InTestingMode()) { AddService <IActivator, TransportCleanupActivator>(); } AddService <IEnvelopeHandler, DelayedEnvelopeHandler>(); AddService <IEnvelopeHandler, ResponseEnvelopeHandler>(); AddService <IEnvelopeHandler, ChainExecutionEnvelopeHandler>(); AddService <IEnvelopeHandler, NoSubscriberHandler>(); SetServiceIfNone <IMessageExecutor, MessageExecutor>(); SetServiceIfNone <IOutgoingSender, OutgoingSender>(); SetServiceIfNone <IAsyncHandling, AsyncHandling>(); subscriptions(); }
public void in_testing_mode_if_package_registry_is_set() { PackageRegistry.Properties[FubuMode.Testing] = true.ToString(); FubuMode.InTestingMode().ShouldBeTrue(); }
public void setup_for_testing_mode() { PackageRegistry.Properties.Remove(FubuMode.Testing); FubuMode.SetupForTestingMode(); FubuMode.InTestingMode().ShouldBeTrue(); }
public void in_testing_mode_is_false_if_no_property_exists() { PackageRegistry.Properties.Remove(FubuMode.Testing); FubuMode.InTestingMode().ShouldBeFalse(); }
public void in_testing_mode_is_false() { PackageRegistry.Properties[FubuMode.Testing] = false.ToString(); FubuMode.InTestingMode().ShouldBeFalse(); }