public void Should_Get_Specified_Name()
        {
            var name = LoadBalancerNameAttribute
                       .GetLoadBalancerName <TestLoadBalancer2>();

            Assert.Equal("balancer2", name);
        }
        public void GetName_By_Type()
        {
            var expected = typeof(TestLoadBalancer3).FullName;
            var name     = LoadBalancerNameAttribute.GetLoadBalancerName(typeof(TestLoadBalancer3));

            Assert.Equal(expected, name);
        }
 public LoadBalancerConfigurations()
 {
     _balancers = new Dictionary <string, LoadBalancerConfiguration>
     {
         [LoadBalancerNameAttribute.GetLoadBalancerName <DefaultLoadBalancer>()] = new LoadBalancerConfiguration()
     };
 }
 public LoadBalancerConfigurations Configure <TBalancer>(
     Action <LoadBalancerConfiguration> configureAction)
 {
     return(Configure(
                LoadBalancerNameAttribute.GetLoadBalancerName <TBalancer>(),
                configureAction
                ));
 }
        public void Should_Get_Full_Class_Name_If_Not_Specified()
        {
            var expected = typeof(TestLoadBalancer1).FullName;

            var name = LoadBalancerNameAttribute
                       .GetLoadBalancerName <TestLoadBalancer1>();

            Assert.Equal(expected, name);
        }
 public LoadBalancerConfiguration GetConfiguration <TBalancer>()
 {
     return(GetConfiguration(LoadBalancerNameAttribute.GetLoadBalancerName <TBalancer>()));
 }