Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Services.Tests/Web/Services
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18197
Modified Files:
WebServiceProxyFactoryTests.cs
Log Message:
Allow web service base type to be configurable in WebServiceExporter. Added tests.
Added tests for the same feature in WebServiceProxyFactory (already implementated).
Index: WebServiceProxyFactoryTests.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Services.Tests/Web/Services/WebServiceProxyFactoryTests.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** WebServiceProxyFactoryTests.cs 7 Dec 2007 14:14:08 -0000 1.6
--- WebServiceProxyFactoryTests.cs 7 Dec 2007 15:44:23 -0000 1.7
***************
*** 434,437 ****
--- 434,458 ----
}
+ [Test]
+ public void UseCustomClientProtocolType()
+ {
+ WebServiceProxyFactory wspf = new WebServiceProxyFactory();
+ wspf.ServiceUri = new AssemblyResource("assembly://Spring.Services.Tests/Spring.Data.Spring.Web.Services/document-literal.wsdl");
+ wspf.ServiceInterface = typeof(IHelloWorld);
+ wspf.ClientProtocolType = typeof(CustomClientProtocol);
+ wspf.AfterPropertiesSet();
+
+ object proxy = wspf.GetObject();
+ Assert.IsNotNull(proxy);
+
+ Type proxyType = proxy.GetType();
+ Assert.IsTrue(proxy is IHelloWorld);
+ Assert.IsTrue(proxy is SoapHttpClientProtocol);
+ Assert.IsTrue(proxy is CustomClientProtocol);
+
+ // Try to instantiate the proxy type
+ ObjectUtils.InstantiateType(proxyType);
+ }
+
#region NestedSchema
***************
*** 556,559 ****
--- 577,584 ----
}
+ public class CustomClientProtocol : SoapHttpClientProtocol
+ {
+ }
+
#endregion
}
|