Example #1
0
        public void RoutingByChannelWithWildcard()
        {
            var service = new TestService();

            var routed = service.Route(
                new Packet()
                {
                    channel = "a.b.c.xxx"
                });
            Assert.IsTrue(routed);

            routed = service.Route(
                new Packet()
                {
                    channel = "a.b.c.zzz"
                });
            Assert.IsTrue(routed);
        }
Example #2
0
        public void RoutingByPacketType()
        {
            var service = new TestService();

            var routed = service.Route(
                new TestPacket());

            Assert.IsTrue(routed);
        }
Example #3
0
        public void NotRouted()
        {
            var service = new TestService();

            var routed = service.Route(
                new Packet()
                {
                    channel = "never.exist.channel"
                });

            Assert.IsFalse(routed);
        }
Example #4
0
        public void RoutingByChannel()
        {
            var service = new TestService();

            var routed = service.Route(
                new Packet()
                {
                    channel = "a.b.c.d"
                });

            Assert.IsTrue(routed);
        }