Exemple #1
0
            public void IsCommandType_should_return_false_for_NServiceBus_types()
            {
                var conventions = new NServiceBus.Conventions
                {
                    IsCommandTypeAction = t => t.Assembly == typeof(NServiceBus.Conventions).Assembly
                };

                Assert.IsFalse(conventions.IsCommandType(typeof(NServiceBus.Conventions)));
            }
Exemple #2
0
            public void IsCommandType_should_return_true_for_matching_type()
            {
                var conventions = new NServiceBus.Conventions
                {
                    IsCommandTypeAction = t => t.Assembly == typeof(NServiceBus.Conventions).Assembly ||
                                          t == typeof(MyConventionCommand)
                };

                Assert.IsTrue(conventions.IsCommandType(typeof(MyConventionCommand)));
            }
 public void IsCommandType_should_return_true_for_matching_type()
 {
     var conventions = new NServiceBus.Conventions
     {
         IsCommandTypeAction = t => t.Assembly == typeof(NServiceBus.Conventions).Assembly ||
                                    t == typeof(MyConventionCommand)
     };
     Assert.IsTrue(conventions.IsCommandType(typeof(MyConventionCommand)));
 }
 public void IsCommandType_should_return_false_for_NServiceBus_types()
 {
     var conventions = new NServiceBus.Conventions
     {
         IsCommandTypeAction = t => t.Assembly == typeof(NServiceBus.Conventions).Assembly
     };
     Assert.IsFalse(conventions.IsCommandType(typeof(NServiceBus.Conventions)));
 }