예제 #1
0
        public void IsMessageType_should_return_true_for_systemMessage()
        {
            var conventions = new Conventions();

            conventions.AddSystemMessagesConventions(type => type == typeof(MySystemMessage));
            Assert.IsTrue(conventions.IsMessageType(typeof(MySystemMessage)));
        }
        public void SetUp()
        {
            var conventions = new Conventions();

            conventions.AddSystemMessagesConventions(type => type != typeof(MyType));
            configuration = new PublishersConfiguration(conventions, new SettingsHolder());
        }
        public void Should_alternate_between_namespaces_for_EndpointOrientedTopologySectionManager_for_publishing()
        {
            var namespaceConfigurations = new NamespaceConfigurations();
            var addressingLogic         = new AddressingLogic(new ThrowOnFailedValidation(settings), new FlatComposition());
            var conventions             = new Conventions();

            conventions.AddSystemMessagesConventions(type => type != typeof(SomeEvent));
            var publishersConfiguration = new PublishersConfiguration(conventions, new SettingsHolder());
            var sectionManager          = new EndpointOrientedTopologySectionManager(PrimaryName, namespaceConfigurations, "sales", publishersConfiguration, namespacePartitioningStrategy, addressingLogic);

            sectionManager.DeterminePublishDestination(typeof(SomeEvent), "sales");
            var publishDestination2 = sectionManager.DeterminePublishDestination(typeof(SomeEvent), "sales");

            Assert.AreEqual(SecondaryName, publishDestination2.Entities.First().Namespace.Alias, "Should have different namespace");
        }
예제 #4
0
 public void IsMessageType_should_return_true_for_systemMessage()
 {
     var conventions = new Conventions();
     conventions.AddSystemMessagesConventions(type => type == typeof(MySystemMessage));
     Assert.IsTrue(conventions.IsMessageType(typeof(MySystemMessage)));
 }