XslTransformTests.cs 817 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // System.Xml.Serialization.XmlSerializer.cs
  3. //
  4. // Author:
  5. // Atsushi Enomoto <[email protected]>
  6. //
  7. // (C) 2002 Atsushi Enomoto
  8. //
  9. using System;
  10. using System.Xml;
  11. using System.Xml.Xsl;
  12. using NUnit.Framework;
  13. namespace MonoTests.System.Xml.Xsl
  14. {
  15. [TestFixture]
  16. public class XslTransformTests : Assertion
  17. {
  18. XmlDocument doc;
  19. XslTransform xslt;
  20. XmlDocument result;
  21. [SetUp]
  22. public void GetReady()
  23. {
  24. doc = new XmlDocument ();
  25. xslt = new XslTransform ();
  26. result = new XmlDocument ();
  27. }
  28. [Test]
  29. public void TestBasicTransform ()
  30. {
  31. doc.LoadXml ("<root/>");
  32. xslt.Load ("XmlFiles/xsl/empty.xsl");
  33. xslt.Transform ("XmlFiles/xsl/empty.xsl", "XmlFiles/xsl/result.xml");
  34. result.Load ("XmlFiles/xsl/result.xml");
  35. AssertEquals ("count", 1, result.ChildNodes.Count);
  36. }
  37. }
  38. }