Merge pull request #496 from nicolas-raoul/unit-test-for-issue2907
[mono.git] / mcs / class / System.XML / Test / System.Xml.Serialization / XmlAttributeAttributeTests.cs
1 //
2 // Tests for System.Xml.Serialization.XmlAttributeAttribute
3 //
4 // Author:
5 //   Gert Driesen
6 //
7 // (C) 2005 Novell
8 //
9
10 using System.Xml.Schema;
11 using System.Xml.Serialization;
12
13 using NUnit.Framework;
14
15 namespace MonoTests.System.XmlSerialization
16 {
17         [TestFixture]
18         public class XmlAttributeAttributeTests
19         {
20                 [Test]
21                 public void AttributeNameDefault ()
22                 {
23                         XmlAttributeAttribute attr = new XmlAttributeAttribute ();
24                         Assert.AreEqual (string.Empty, attr.AttributeName, "#1");
25
26                         attr.AttributeName = null;
27                         Assert.AreEqual (string.Empty, attr.AttributeName, "#2");
28                 }
29
30                 [Test]
31                 public void DataTypeDefault ()
32                 {
33                         XmlAttributeAttribute attr = new XmlAttributeAttribute ();
34                         Assert.AreEqual (string.Empty, attr.DataType, "#1");
35
36                         attr.DataType = null;
37                         Assert.AreEqual (string.Empty, attr.DataType, "#2");
38                 }
39
40                 [Test]
41                 public void FormDefault ()
42                 {
43                         XmlAttributeAttribute attr = new XmlAttributeAttribute ();
44                         Assert.AreEqual (XmlSchemaForm.None, attr.Form);
45                 }
46
47                 [Test]
48                 public void NamespaceDefault ()
49                 {
50                         XmlAttributeAttribute attr = new XmlAttributeAttribute ();
51                         Assert.IsNull (attr.Namespace);
52                 }
53
54                 [Test]
55                 public void TypeDefault ()
56                 {
57                         XmlAttributeAttribute attr = new XmlAttributeAttribute ();
58                         Assert.IsNull (attr.Type);
59                 }
60         }
61 }