public void Can_Resolve_MessageName_For_Known_DataContract_With_Explicit_Name()
 {
     var messageNamingService = new DataContractMessageNamingService();
     messageNamingService.Add(typeof(ContractB));
     var messageName = messageNamingService.GetNameForType(typeof(ContractB));
     Assert.That(messageName, Is.Not.Null);
     Assert.That((string)messageName, Is.EqualTo("http://platibus/unittests:Contract-B"));
 }
 public void Can_Resolve_MessageName_For_Known_DataContract_With_Defaults()
 {
     var messageNamingService = new DataContractMessageNamingService();
     messageNamingService.Add(typeof(ContractA));
     var messageName = messageNamingService.GetNameForType(typeof(ContractA));
     Assert.That(messageName, Is.Not.Null);
     Assert.That((string)messageName, Is.EqualTo("http://schemas.datacontract.org/2004/07/Platibus.UnitTests:DataContractMessageNamingServiceTests.ContractA"));
 }
Esempio n. 3
0
        public void MessageNameCanBeResolvedForRegisteredTypesWithExplicitNames()
        {
            var messageNamingService = new DataContractMessageNamingService();

            messageNamingService.Add(typeof(ContractB));
            var messageName = messageNamingService.GetNameForType(typeof(ContractB));

            Assert.NotNull(messageName);
            Assert.Equal("http://platibus/unittests:Contract-B", messageName);
        }
Esempio n. 4
0
        public void MessageNameCanBeResolvedForRegisteredTypes()
        {
            var messageNamingService = new DataContractMessageNamingService();

            messageNamingService.Add(typeof(ContractA));
            var messageName = messageNamingService.GetNameForType(typeof(ContractA));

            Assert.NotNull(messageName);
            Assert.Equal("http://schemas.datacontract.org/2004/07/Platibus.UnitTests:DataContractMessageNamingServiceTests.ContractA", messageName);
        }