public void Can_Resolve_MessageName_For_Unknown_DataContract_With_Defaults() { var messageNamingService = new DataContractMessageNamingService(); 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")); }
public void MessageNameCanBeResolvedForUnregisteredTypesWithExplicitNames() { var messageNamingService = new DataContractMessageNamingService(); var messageName = messageNamingService.GetNameForType(typeof(ContractB)); Assert.NotNull(messageName); Assert.Equal("http://platibus/unittests:Contract-B", messageName); }
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 MessageNameCanBeResolvedForUnregisteredTypes() { var messageNamingService = new DataContractMessageNamingService(); var messageName = messageNamingService.GetNameForType(typeof(ContractA)); Assert.NotNull(messageName); Assert.Equal("http://schemas.datacontract.org/2004/07/Platibus.UnitTests:DataContractMessageNamingServiceTests.ContractA", messageName); }