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))); }
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); }
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))); }
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 IsMessageType_should_return_true_for_IEvent() { var conventions = new NServiceBus.Conventions(); Assert.IsTrue(conventions.IsMessageType(typeof(MyEvent))); }
public void IsMessageType_should_return_false_for_unknown_type() { var conventions = new NServiceBus.Conventions(); Assert.IsFalse(conventions.IsMessageType(typeof(NoAMessage))); }