mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
Update TestDocumentEncryption.java
This commit is contained in:
parent
4efa2b7162
commit
6ba4a1b050
@ -17,12 +17,6 @@
|
|||||||
|
|
||||||
package org.apache.poi.hslf.record;
|
package org.apache.poi.hslf.record;
|
||||||
|
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
@ -49,6 +43,8 @@ import org.junit.jupiter.api.Test;
|
|||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
import org.junit.jupiter.params.provider.ValueSource;
|
import org.junit.jupiter.params.provider.ValueSource;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests that DocumentEncryption works properly.
|
* Tests that DocumentEncryption works properly.
|
||||||
*/
|
*/
|
||||||
@ -66,7 +62,7 @@ public class TestDocumentEncryption {
|
|||||||
try {
|
try {
|
||||||
try (POIFSFileSystem fs = new POIFSFileSystem(slTests.getFile(pptFile), true);
|
try (POIFSFileSystem fs = new POIFSFileSystem(slTests.getFile(pptFile), true);
|
||||||
HSLFSlideShow ppt = new HSLFSlideShow(fs)) {
|
HSLFSlideShow ppt = new HSLFSlideShow(fs)) {
|
||||||
assertTrue(ppt.getSlides().size() > 0);
|
assertFalse(ppt.getSlides().isEmpty());
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
Biff8EncryptionKey.setCurrentUserPassword(null);
|
Biff8EncryptionKey.setCurrentUserPassword(null);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user