Browse Source

Added tests

Piotr Czajkowski 1 year ago
parent
commit
5e2364a80d
1 changed files with 14 additions and 0 deletions
  1. 14 0
      PSDTextTests/PSDTextTests.cs

+ 14 - 0
PSDTextTests/PSDTextTests.cs

@@ -27,6 +27,13 @@ namespace PSDTextTests
             File.Delete(destination);
         }
 
+        [Fact]
+        public void SaveAsXMLWrongPath()
+        {
+            var test = new PSDText.PSDText(TestFile);
+            Assert.Throws<ArgumentNullException>(() => test.SaveAsXML(null));
+        }
+
         [Fact]
         public void NoText()
         {
@@ -43,5 +50,12 @@ namespace PSDTextTests
             Assert.True(File.Exists(destination));
             File.Delete(destination);
         }
+
+        [Fact]
+        public void SaveAsJSONWrongPath()
+        {
+            var test = new PSDText.PSDText(TestFile);
+            Assert.Throws<ArgumentNullException>(() => test.SaveAsJSON(null));
+        }
     }
 }