Browse Source

Improved test

Piotr Czajkowski 5 years ago
parent
commit
084ce4bc83

+ 3 - 0
DOCXTests/DOCXTests.cs

@@ -84,12 +84,15 @@ namespace DOCXTests
         public void AnonymizeAuthorsTest()
         {
             const string testFile = @"testFiles/testComments.docx";
+            const string expectedFile = @"testFiles/testCommentsAnonymized.docx";
 
             using (var test = new DOCX.Docx(testFile))
             {
                 var result = test.AnonymizeComments();
                 Assert.True(result.status);
             }
+            
+            Assert.True(FileCompare(expectedFile, testFile));
         }
     }
 }

+ 3 - 0
DOCXTests/DOCXTests.csproj

@@ -26,6 +26,9 @@
       <None Update="testFiles\testComments.docx">
         <CopyToOutputDirectory>Always</CopyToOutputDirectory>
       </None>
+      <None Update="testFiles\testCommentsAnonymized.docx">
+        <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+      </None>
     </ItemGroup>
 
 </Project>

BIN
DOCXTests/testFiles/testCommentsAnonymized.docx