예제 #1
0
 public MicroserviceContext(
     IMicroserviceInstanceFactory microserviceInstanceFactory,
     IAlleyLogger logger) : this(
         new ConcurrentDictionary <string, IMicroservice>(),
         new ConcurrentDictionary <string, IMicroservice>(),
         new ConcurrentDictionary <Uri, IMicroserviceInstance>(),
         microserviceInstanceFactory,
         logger)
 {
 }
예제 #2
0
 public MicroserviceContext(
     IDictionary <string, IMicroservice> servicesOwners,
     IDictionary <string, IMicroservice> microservices,
     IDictionary <Uri, IMicroserviceInstance> instances,
     IMicroserviceInstanceFactory microserviceInstanceFactory,
     IAlleyLogger logger)
 {
     _servicesOwners = servicesOwners;
     _microservices  = microservices;
     _instances      = instances;
     _microserviceInstanceFactory = microserviceInstanceFactory;
     _logger = logger;
 }
예제 #3
0
        public MicroserviceContextTests()
        {
            _logger = Substitute.For <IAlleyLogger>();
            _microserviceInstanceFactory = Substitute.For <IMicroserviceInstanceFactory>();

            _servicesOwners = Substitute.For <IDictionary <string, IMicroservice> >();
            _microservices  = Substitute.For <IDictionary <string, IMicroservice> >();
            _instances      = Substitute.For <IDictionary <Uri, IMicroserviceInstance> >();
            _sut            = new MicroserviceContext(
                _servicesOwners,
                _microservices,
                _instances,
                _microserviceInstanceFactory,
                _logger);
        }