public void Locate_Test()
        {
            ServiceRegistryConfig registryConfig = BuildRegsitryConfig();
            IServiceRegistry serviceRegistry = new ConfigBasedServiceRegistry(registryConfig);
            ServiceBrokerConfig config = BuildBrokerConfig();
            IServiceBroker serviceBroker = new ServiceBroker(serviceRegistry, config);
            ITestService testService = serviceBroker.Locate<ITestService>();

            Assert.IsNotNull(testService);
        }
        public void GetServiceInfo_Test()
        {
            ServiceRegistryConfig config = BuildRegsitryConfig();
            IServiceRegistry registry = new ConfigBasedServiceRegistry(config);
            var serviceInfo = registry.GetServiceInfo<ITestService>();

            Assert.IsNotNull(serviceInfo);

            //since the ServiceRegistry is caching the config, if we ask for this service again, we should get back a reference to the same instance
            Assert.AreSame(serviceInfo, registry.GetServiceInfo<ITestService>());
        }
 public void GetServiceInfo_ServiceNotRegistered_Test_()
 {
     ServiceRegistryConfig config = BuildRegsitryConfig();
     IServiceRegistry registry = new ConfigBasedServiceRegistry(config);
     var serviceInfo = registry.GetServiceInfo<IClaimsService>();
 }