示例#1
0
        public void RoundRobinFact()
        {
            var router   = new CondenserDotNet.Core.Routing.RoundRobinRoutingStrategy <RoutedService>();
            var service1 = router.RouteTo(_services);
            var service2 = router.RouteTo(_services);
            var service3 = router.RouteTo(_services);

            Assert.Equal(1, service1.Id);
            Assert.Equal(2, service2.Id);
            Assert.Equal(1, service3.Id);
        }
示例#2
0
        public void RoundRobinNullListFact()
        {
            var router  = new CondenserDotNet.Core.Routing.RoundRobinRoutingStrategy <RoutedService>();
            var service = router.RouteTo(null);

            Assert.Null(service);
        }