Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }