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