XmlFormatExtensionAttributeTest.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // MonoTests.System.Web.Services.Configuration.XmlFormatExtensionAttributeTest.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. // Dave Bettin ([email protected])
  7. //
  8. // Copyright (C) Tim Coleman, 2002
  9. // Copyright (C) Dave Bettin, 2003
  10. //
  11. using NUnit.Framework;
  12. using System;
  13. using System.Web.Services.Configuration;
  14. using System.Web.Services.Description;
  15. namespace MonoTests.System.Web.Services.Configuration {
  16. [TestFixture]
  17. public class XmlFormatExtensionAttributeTest {
  18. [Test]
  19. public void TestConstructors ()
  20. {
  21. XmlFormatExtensionAttribute attribute;
  22. /* attribute = new XmlFormatExtensionAttribute ();
  23. Assert.AreEqual (String.Empty, attribute.ElementName);
  24. Assert.AreEqual (null, attribute.ExtensionPoints);
  25. Assert.AreEqual (String.Empty, attribute.Namespace);
  26. string elementName = "binding";
  27. string ns = "http://schemas.xmlsoap.org/wsdl/http/";
  28. Type[] types = new Type[4] {typeof (Binding), typeof (Binding), typeof (Binding), typeof (Binding)};
  29. attribute = new XmlFormatExtensionAttribute (elementName, ns, types[0]);
  30. Assert.AreEqual (elementName, attribute.ElementName);
  31. Assert.AreEqual (new Type[1] {types[0]}, attribute.ExtensionPoints);
  32. Assert.AreEqual (ns, attribute.Namespace);
  33. attribute = new XmlFormatExtensionAttribute (elementName, ns, types[0], types[1]);
  34. Assert.AreEqual (elementName, attribute.ElementName);
  35. Assert.AreEqual (types[1]}, attribute.ExtensionPoints, new Type[2] {types[0]);
  36. Assert.AreEqual (ns, attribute.Namespace);
  37. attribute = new XmlFormatExtensionAttribute (elementName, ns, types[0], types[1], types[2]);
  38. Assert.AreEqual (elementName, attribute.ElementName);
  39. Assert.AreEqual (types[1], types[2]}, attribute.ExtensionPoints, new Type[3] {types[0]);
  40. Assert.AreEqual (ns, attribute.Namespace);
  41. attribute = new XmlFormatExtensionAttribute (elementName, ns, types[0], types[1], types[2], types[3]);
  42. Assert.AreEqual (elementName, attribute.ElementName);
  43. Assert.AreEqual (types[1], types[2], types[3]}, attribute.ExtensionPoints, new Type[4] {types[0]);
  44. Assert.AreEqual (ns, attribute.Namespace);
  45. attribute = new XmlFormatExtensionAttribute (elementName, ns, types);
  46. Assert.AreEqual (elementName, attribute.ElementName);
  47. Assert.AreEqual (types, attribute.ExtensionPoints);
  48. Assert.AreEqual (ns, attribute.Namespace);*/
  49. }
  50. }
  51. }