PSDTextTests.cs 676 B

1234567891011121314151617181920212223242526272829
  1. using System.IO;
  2. using Xunit;
  3. namespace PSDTextTests
  4. {
  5. public class PSDTextTests
  6. {
  7. private const string TestFile = "./testFiles/test.psd";
  8. [Fact]
  9. public void ReadXMLFromPSD()
  10. {
  11. var test = new PSDText.PSDText(TestFile);
  12. Assert.NotEmpty(test.TextData);
  13. }
  14. [Fact]
  15. public void SaveAsXML()
  16. {
  17. var test = new PSDText.PSDText(TestFile);
  18. Assert.NotEmpty(test.TextData);
  19. var destination = "./test.xml";
  20. test.SaveAsXML(destination);
  21. Assert.True(File.Exists(destination));
  22. File.Delete(destination);
  23. }
  24. }
  25. }