2 // System.Xml.XmlAttributesTests
11 using System.Xml.Serialization;
13 using NUnit.Framework;
15 using MonoTests.System.Xml.TestClasses;
17 namespace MonoTests.System.XmlSerialization
20 public class SoapAttributesTests
23 [Category ("MobileNotWorking")]
24 public void Defaults ()
26 SoapAttributes atts = new SoapAttributes ();
27 Assert.IsNull (atts.SoapAttribute, "#1");
28 Assert.IsNull (atts.SoapDefaultValue, "#2");
29 Assert.IsNull (atts.SoapElement, "#4");
30 Assert.IsNull (atts.SoapEnum, "#5");
31 Assert.AreEqual (false, atts.SoapIgnore, "#6");
32 Assert.IsNull (atts.SoapType, "#7");
36 public void SoapType ()
38 SoapAttributes atts = new SoapAttributes (typeof (TestDefault));
39 Assert.IsNotNull (atts.SoapType, "#1");
40 Assert.AreEqual ("testDefault", atts.SoapType.TypeName, "#2");
41 Assert.AreEqual ("urn:myNS", atts.SoapType.Namespace, "#3");
45 public void SoapDefaultValue ()
47 SoapAttributes atts = new SoapAttributes (typeof (TestDefault).GetMember("strDefault")[0]);
48 Assert.IsNotNull (atts.SoapDefaultValue, "#1");
49 Assert.AreEqual ("Default Value", atts.SoapDefaultValue, "#2");
53 public void SoapEnum ()
55 SoapAttributes atts = new SoapAttributes (typeof (FlagEnum_Encoded).GetMember("e1")[0]);
56 Assert.IsNotNull (atts.SoapEnum, "#1");
57 Assert.AreEqual ("one", atts.SoapEnum.Name, "#2");