XmlAttributeAttributeTests.cs 1.3 KB

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