public void negative_match()
        {
            var rule = new LambdaRoutingRule(type => type == typeof(BusSettings));

            rule.Matches(GetType()).ShouldBeFalse();
        }
        public void positive_match()
        {
            var rule = new LambdaRoutingRule(type => type == typeof(BusSettings));

            rule.Matches(typeof(BusSettings)).ShouldBeTrue();
        }
Пример #3
0
        public void negative_match()
        {
            var rule = new LambdaRoutingRule("test", type => type == typeof(FakeAppSettings));

            ShouldBeBooleanExtensions.ShouldBeFalse(rule.Matches(GetType()));
        }
Пример #4
0
        public void positive_match()
        {
            var rule = new LambdaRoutingRule("is type", type => type == typeof(FakeAppSettings));

            ShouldBeBooleanExtensions.ShouldBeTrue(rule.Matches(typeof(FakeAppSettings)));
        }
Пример #5
0
        /// <summary>
        /// Directs Jasper to try to publish all messages locally even if there are other
        /// subscribers for the message type
        /// </summary>
        /// <exception cref="NotImplementedException"></exception>
        public void AllMessagesLocally()
        {
            var rule = new LambdaRoutingRule("Everything", t => true);

            _bus.Settings.LocalPublishing.Add(rule);
        }