Beispiel #1
0
        public void IsMessageType_should_return_true_for_systemMessage()
        {
            var conventions = new NServiceBus.Conventions();

            conventions.AddSystemMessagesConventions(type => type == typeof(MySystemMessage));
            Assert.IsTrue(conventions.IsMessageType(typeof(MySystemMessage)));
        }
Beispiel #2
0
        public void Should_use_TimeToBeReceived_from_bottom_of_tree()
        {
            var conventions            = new NServiceBus.Conventions();
            var timeToBeReceivedAction = conventions.GetTimeToBeReceived(typeof(InheritedClassWithAttribute));

            Assert.AreEqual(TimeSpan.FromSeconds(2), timeToBeReceivedAction);
        }
Beispiel #3
0
            public void IsEventType_should_return_false_for_NServiceBus_types()
            {
                var conventions = new NServiceBus.Conventions
                {
                    IsEventTypeAction = t => t.Assembly == typeof(NServiceBus.Conventions).Assembly
                };

                Assert.IsFalse(conventions.IsEventType(typeof(NServiceBus.Conventions)));
            }
Beispiel #4
0
            public void IsEventType_should_return_true_for_matching_type()
            {
                var conventions = new NServiceBus.Conventions
                {
                    IsEventTypeAction = t => t.Assembly == typeof(NServiceBus.Conventions).Assembly ||
                                        t == typeof(MyConventionEvent)
                };

                Assert.IsTrue(conventions.IsEventType(typeof(MyConventionEvent)));
            }
        public void BaseSetUp()
        {
            conventions = BuildConventions();

            var encryptedValue = new EncryptedValue
            {
                EncryptedBase64Value = EncryptedBase64Value,
                Base64Iv             = "init_vector"
            };
            var fakeEncryptionService = new FakeEncryptionService(encryptedValue);

            mutator = new EncryptionMutator(fakeEncryptionService, conventions);
        }
        public void BaseSetUp()
        {
            conventions = BuildConventions();

            var encryptedValue = new EncryptedValue
            {
                EncryptedBase64Value = EncryptedBase64Value,
                Base64Iv = "init_vector"
            };
            var fakeEncryptionService = new FakeEncryptionService(encryptedValue);
            mutator = new EncryptionMutator(fakeEncryptionService, conventions);
        }
Beispiel #7
0
        public void IsMessageType_should_return_true_for_IEvent()
        {
            var conventions = new NServiceBus.Conventions();

            Assert.IsTrue(conventions.IsMessageType(typeof(MyEvent)));
        }
Beispiel #8
0
        public void IsMessageType_should_return_false_for_unknown_type()
        {
            var conventions = new NServiceBus.Conventions();

            Assert.IsFalse(conventions.IsMessageType(typeof(NoAMessage)));
        }
Beispiel #9
0
 public void Should_use_TimeToBeReceived_from_bottom_of_tree()
 {
     var conventions = new NServiceBus.Conventions();
     var timeToBeReceivedAction = conventions.GetTimeToBeReceived(typeof(InheritedClassWithAttribute));
     Assert.AreEqual(TimeSpan.FromSeconds(2), timeToBeReceivedAction);
 }
Beispiel #10
0
 public void IsMessageType_should_return_true_for_systemMessage()
 {
     var conventions = new NServiceBus.Conventions();
     conventions.AddSystemMessagesConventions(type => type == typeof(MySystemMessage));
     Assert.IsTrue(conventions.IsMessageType(typeof(MySystemMessage)));
 }
Beispiel #11
0
 public void IsMessageType_should_return_true_for_IEvent()
 {
     var conventions = new NServiceBus.Conventions();
     Assert.IsTrue(conventions.IsMessageType(typeof(MyEvent)));
 }
Beispiel #12
0
 public void IsMessageType_should_return_false_for_unknown_type()
 {
     var conventions = new NServiceBus.Conventions();
     Assert.IsFalse(conventions.IsMessageType(typeof(NoAMessage)));
 }
Beispiel #13
0
 public void IsEventType_should_return_true_for_matching_type()
 {
     var conventions = new NServiceBus.Conventions
     {
         IsEventTypeAction = t => t.Assembly == typeof(NServiceBus.Conventions).Assembly ||
                                    t == typeof(MyConventionEvent)
     };
     Assert.IsTrue(conventions.IsEventType(typeof(MyConventionEvent)));
 }
Beispiel #14
0
 public void IsEventType_should_return_false_for_NServiceBus_types()
 {
     var conventions = new NServiceBus.Conventions
     {
         IsEventTypeAction = t => t.Assembly == typeof(NServiceBus.Conventions).Assembly
     };
     Assert.IsFalse(conventions.IsEventType(typeof(NServiceBus.Conventions)));
 }