Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / class / System.XML / Test / System.Xml.Serialization / SoapAttributesTests.cs
1 //
2 // System.Xml.XmlAttributesTests
3 //
4 // Author:
5 //   Gert Driesen
6 //
7 // (C) 2006 Novell
8 //
9
10 using System;
11 using System.Xml.Serialization;
12
13 using NUnit.Framework;
14
15 using MonoTests.System.Xml.TestClasses;
16
17 namespace MonoTests.System.XmlSerialization
18 {
19         [TestFixture]
20         public class SoapAttributesTests
21         {
22                 [Test]
23                 [Category ("MobileNotWorking")]
24                 public void Defaults ()
25                 {
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");
33                 }
34
35                 [Test]
36                 public void SoapType ()
37                 {
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");
42                 }
43
44                 [Test]
45                 public void SoapDefaultValue ()
46                 {
47                         SoapAttributes atts = new SoapAttributes (typeof (TestDefault).GetMember("strDefault")[0]);
48                         Assert.IsNotNull (atts.SoapDefaultValue, "#1");
49                         Assert.AreEqual ("Default Value", atts.SoapDefaultValue, "#2");
50                 }
51
52                 [Test]
53                 public void SoapEnum ()
54                 {
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");
58                 }
59         }
60 }