public void TestExcelPasswordProtection() { // Given var file = Path.Combine(Statics.AppPath(), @"TestResources\Passwordprotected.xlsx"); // When var test = MsOffice.IsPasswordProtected(file); // Then Assert.That(test, Is.True); }
public void TestNoPasswordProtection() { // Given var file = Path.Combine(Statics.AppPath(), @"TestResources\NoPassword.docx"); // When var test = MsOffice.IsPasswordProtected(file); // Then Assert.That(test, Is.False); }