2009-07-11 Michael Barker <mike@middlesoft.co.uk>
[mono.git] / mcs / class / System.Web.Services / Test / System.Web.Services.Configuration / XmlFormatExtensionAttributeTest.cs
1 //
2 // MonoTests.System.Web.Services.Configuration.XmlFormatExtensionAttributeTest.cs
3 //
4 // Author:
5 //   Tim Coleman (tim@timcoleman.com)
6 //   Dave Bettin (dave@opendotnet.com)
7 //
8 // Copyright (C) Tim Coleman, 2002
9 // Copyright (C) Dave Bettin, 2003
10 //
11
12 using NUnit.Framework;
13 using System;
14 using System.Web.Services.Configuration;
15 using System.Web.Services.Description;
16
17 namespace MonoTests.System.Web.Services.Configuration {
18
19         [TestFixture]
20         public class XmlFormatExtensionAttributeTest {
21
22
23                 [Test]
24                 public void TestConstructors ()
25                 {
26                         XmlFormatExtensionAttribute attribute;
27
28                 /*      attribute = new XmlFormatExtensionAttribute ();
29                         Assert.AreEqual (String.Empty, attribute.ElementName);
30                         Assert.AreEqual (null, attribute.ExtensionPoints);
31                         Assert.AreEqual (String.Empty, attribute.Namespace);
32
33                         string elementName = "binding";
34                         string ns = "http://schemas.xmlsoap.org/wsdl/http/";
35                         Type[] types = new Type[4] {typeof (Binding), typeof (Binding), typeof (Binding), typeof (Binding)};
36
37                         attribute = new XmlFormatExtensionAttribute (elementName, ns, types[0]);
38                         Assert.AreEqual (elementName, attribute.ElementName);
39                         Assert.AreEqual (new Type[1] {types[0]}, attribute.ExtensionPoints);
40                         Assert.AreEqual (ns, attribute.Namespace);
41
42                         attribute = new XmlFormatExtensionAttribute (elementName, ns, types[0], types[1]);
43                         Assert.AreEqual (elementName, attribute.ElementName);
44                         Assert.AreEqual (types[1]}, attribute.ExtensionPoints, new Type[2] {types[0]);
45                         Assert.AreEqual (ns, attribute.Namespace);
46
47                         attribute = new XmlFormatExtensionAttribute (elementName, ns, types[0], types[1], types[2]);
48                         Assert.AreEqual (elementName, attribute.ElementName);
49                         Assert.AreEqual (types[1], types[2]}, attribute.ExtensionPoints, new Type[3] {types[0]);
50                         Assert.AreEqual (ns, attribute.Namespace);
51
52                         attribute = new XmlFormatExtensionAttribute (elementName, ns, types[0], types[1], types[2], types[3]);
53                         Assert.AreEqual (elementName, attribute.ElementName);
54                         Assert.AreEqual (types[1], types[2], types[3]}, attribute.ExtensionPoints, new Type[4] {types[0]);
55                         Assert.AreEqual (ns, attribute.Namespace);
56
57                         attribute = new XmlFormatExtensionAttribute (elementName, ns, types);
58                         Assert.AreEqual (elementName, attribute.ElementName);
59                         Assert.AreEqual (types, attribute.ExtensionPoints);
60                         Assert.AreEqual (ns, attribute.Namespace);*/
61                 }
62         }
63 }