public void Can_Resolve_MessageType_For_Unknown_DataContract_With_Explicit_Name()
 {
     var messageNamingService = new DataContractMessageNamingService();
     var messageType = messageNamingService.GetTypeForName("http://platibus/unittests:Contract-B");
     Assert.That(messageType, Is.Not.Null);
     Assert.That(messageType, Is.EqualTo(typeof(ContractB)));
 }
 public void Can_Resolve_MessageType_For_Unknown_DataContract_With_Defaults()
 {
     var messageNamingService = new DataContractMessageNamingService();
     var messageType = messageNamingService.GetTypeForName("http://schemas.datacontract.org/2004/07/Platibus.UnitTests:DataContractMessageNamingServiceTests.ContractA");
     Assert.That(messageType, Is.Not.Null);
     Assert.That(messageType, Is.EqualTo(typeof(ContractA)));
 }
示例#3
0
        public void MessageTypeCanBeResolvedForUnregisteredTypes()
        {
            var messageNamingService = new DataContractMessageNamingService();
            var messageType          = messageNamingService.GetTypeForName("http://schemas.datacontract.org/2004/07/Platibus.UnitTests:DataContractMessageNamingServiceTests.ContractA");

            Assert.NotNull(messageType);
            Assert.Equal(typeof(ContractA), messageType);
        }
示例#4
0
        public void MessageTypeCanBeResolvedForUnregisteredTypesWithExplicitNames()
        {
            var messageNamingService = new DataContractMessageNamingService();
            var messageType          = messageNamingService.GetTypeForName("http://platibus/unittests:Contract-B");

            Assert.NotNull(messageType);
            Assert.Equal(typeof(ContractB), messageType);
        }