Exemplo n.º 1
0
        protected override IServiceLocator CreateContainer()
        {
            Bootstrapper.Bootstrap();

            var adapter = new StructureMapAdapter(ObjectFactory.Container);

            InitNServiceBus();

            return adapter;
        }
Exemplo n.º 2
0
        public override void Setup()
        {
            _mocks      = new MockRepository();
            _autoMocker = new RhinoAutoMocker <TSut>(MockMode.AAA);
            var serviceLocator = new StructureMapAdapter(_autoMocker.Container);

            ServiceLocator.SetLocatorProvider(() => serviceLocator);
            ProvideImplementationOf <IServiceLocator>(serviceLocator);
            base.Setup();
        }
Exemplo n.º 3
0
        public static IRegistry RegisterEasyNetQ(this IRegistry registry, Func <IServiceResolver, ConnectionConfiguration> connectionConfigurationFactory, Action <IServiceRegister> registerServices)
        {
            if (registry == null)
            {
                throw new ArgumentNullException(nameof(registry));
            }

            var serviceRegister = new StructureMapAdapter(registry);

            RabbitHutch.RegisterBus(serviceRegister, connectionConfigurationFactory, registerServices);
            return(registry);
        }
 public StructureMapAdapterTests()
 {
     container = new Mock <IContainer>();
     adapter   = new StructureMapAdapter(container.Object);
 }
 public StructureMapAdapterTests()
 {
     container = new Mock<IContainer>();
     adapter = new StructureMapAdapter(container.Object);
 }