Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/Services
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17502
Modified Files:
WebServiceExporterTests.cs
Log Message:
Refactored Stan D. contribution [SPRNET-606]
Index: WebServiceExporterTests.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/Services/WebServiceExporterTests.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** WebServiceExporterTests.cs 8 Aug 2007 17:49:38 -0000 1.4
--- WebServiceExporterTests.cs 3 Dec 2007 09:08:07 -0000 1.5
***************
*** 25,32 ****
--- 25,34 ----
using System.Text;
using System.Reflection;
+ using System.Reflection.Emit;
using System.Web.Services;
using NUnit.Framework;
+ using Spring.Util;
using Spring.Core.IO;
using Spring.Objects.Factory.Xml;
***************
*** 216,219 ****
--- 218,241 ----
}
+
+ [Test]
+ public void AppliesCustomAttributeBuilderToType()
+ {
+ wse.ObjectName = "AppliesCustomAttributeBuilderToType";
+ wse.TargetName = "noDecoratedService";
+ wse.TypeAttributes = new CustomAttributeBuilder[] {
+ new CustomAttributeBuilder(typeof(WebServiceAttribute).GetConstructor(Type.EmptyTypes), ObjectUtils.EmptyObjects) };
+ wse.AfterPropertiesSet();
+
+ Type proxyType = wse.ObjectType;
+
+ object[] attrs = proxyType.GetCustomAttributes(typeof(WebServiceAttribute), true);
+ Assert.IsNotEmpty(attrs);
+ Assert.AreEqual(1, attrs.Length);
+
+ WebServiceAttribute wsa = attrs[0] as WebServiceAttribute;
+ Assert.AreEqual("AppliesCustomAttributeBuilderToType", wsa.Name);
+ }
+
#region Test classes
|