ExporterTests.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using PixiEditor.Models.DataHolders;
  2. using PixiEditor.Models.IO;
  3. using PixiEditor.Models.Layers;
  4. using PixiEditor.Models.Position;
  5. using SkiaSharp;
  6. using System.IO;
  7. using System.Windows.Media.Imaging;
  8. using Xunit;
  9. namespace PixiEditorTests.ModelsTests.IO
  10. {
  11. public class ExporterTests
  12. {
  13. //private const string FilePath = "test.file";
  14. //[Fact]
  15. //public void TestThatSaveAsPngSavesFile()
  16. //{
  17. // Exporter.SaveAsPng(FilePath, 10, 10, BitmapFactory.New(10, 10));
  18. // Assert.True(File.Exists(FilePath));
  19. // File.Delete(FilePath);
  20. //}
  21. //[Fact]
  22. //public void TestThatSaveAsEditableFileSavesPixiFile()
  23. //{
  24. // Document document = new Document(2, 2);
  25. // string filePath = "testFile.pixi";
  26. // document.Layers.Add(new Layer("layer1"));
  27. // document.Layers[0].SetPixel(new Coordinates(1, 1), SKColors.White);
  28. // document.Swatches.Add(SKColors.White);
  29. // Exporter.SaveAsEditableFile(document, filePath);
  30. // Assert.True(File.Exists(filePath));
  31. // File.Delete(filePath);
  32. //}
  33. }
  34. }