public void ComputeAdapterNameResolvesActualProtocolTypeNameForWcfCustomIsolatedAdapter() { Skip.IfNot(BizTalkServerGroup.IsConfigured); var sut = new NamingConventionSpy(); IAdapter adapter = new CustomIsolatedAdapterDummy <NetTcpBindingElement, CustomRLConfig>(); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomIsolatedNetTcp"); adapter = new CustomIsolatedAdapterDummy <WSHttpBindingElement, CustomRLConfig>(); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomIsolatedWsHttp"); adapter = new CustomIsolatedAdapterDummy <BasicHttpBindingElement, CustomRLConfig>(); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomIsolatedBasicHttp"); }
public void ComputeAdapterNameForOffice365EmailAdapter() { Skip.IfNot(BizTalkServerGroup.IsConfigured); var sut = new NamingConventionSpy(); IAdapter adapter = new Office365EmailAdapter.Inbound(); sut.ComputeAdapterNameSpy(adapter).Should().Be("Office365Email"); }
public void ComputeAdapterNameResolvesActualProtocolTypeNameForWcfCustomAdapter() { Skip.IfNot(BizTalkServerGroup.IsConfigured); var sut = new NamingConventionSpy(); IAdapter adapter = new CustomAdapterDummy <NetTcpBindingElement, CustomRLConfig>(); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomNetTcp"); adapter = new CustomAdapterDummy <NetMsmqBindingElement, CustomRLConfig>(); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomNetMsmq"); adapter = new CustomAdapterDummy <Be.Stateless.BizTalk.Dsl.Binding.ServiceModel.Configuration.NetMsmqBindingElement, CustomRLConfig>(); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomNetMsmq"); adapter = new CustomAdapterDummy <OracleDBBindingConfigurationElement, CustomRLConfig>(); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomOracleDB"); adapter = new CustomAdapterDummy <SqlAdapterBindingConfigurationElement, CustomRLConfig>(); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomSql"); adapter = new WcfCustomAdapter.Outbound <CustomBindingElement>(a => a.Binding.Add(new MtomMessageEncodingElement(), new HttpsTransportElement())); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomHttps"); adapter = new WcfCustomAdapter.Outbound <CustomBindingElement>(a => a.Binding.Add(new TcpTransportElement())); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomTcp"); adapter = new WcfCustomAdapter.Outbound <CustomBindingElement>(a => a.Binding.Add(new SAPAdapterExtensionElement())); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomSap"); adapter = new WcfCustomAdapter.Outbound <CustomBindingElement>(a => a.Binding.Add(new SqlAdapterBindingElementExtensionElement())); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomSql"); // notice that OracleDBAdapterExtensionElement is internal :( //adapter = new WcfCustomAdapter.Outbound<CustomBindingElement>(a => a.Binding.Add(new OracleDBAdapterExtensionElement())); var type = typeof(Microsoft.Adapters.OracleDB.InboundOperation).Assembly.GetType("Microsoft.Adapters.OracleDB.OracleDBAdapterExtensionElement", true); var bindingElement = (BindingElementExtensionElement)Activator.CreateInstance(type); adapter = new WcfCustomAdapter.Outbound <CustomBindingElement>(a => a.Binding.Add(bindingElement)); sut.ComputeAdapterNameSpy(adapter).Should().Be("WCF-CustomOracleDB"); }