60881 -- fix unit test to use assumeTrue thanks to Javen's recommendation.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1788133 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tim Allison 2017-03-22 16:21:25 +00:00
parent f7c4357dae
commit 398a7197bd
2 changed files with 5 additions and 3 deletions

View File

@ -30,6 +30,7 @@ import org.apache.poi.xssf.usermodel.XSSFRichTextString;
*/
@Internal
class XSSFBRichTextString extends XSSFRichTextString {
private final String string;
XSSFBRichTextString(String string) {

View File

@ -37,6 +37,7 @@ import org.apache.poi.xssf.extractor.XSSFBEventBasedExcelExtractor;
import org.apache.poi.xssf.extractor.XSSFEventBasedExcelExtractor;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.xmlbeans.XmlException;
import org.junit.Assume;
import org.junit.Test;
public class TestSecureTempZip {
@ -91,9 +92,9 @@ public class TestSecureTempZip {
//The test file requires that JCE unlimited be installed.
//If it isn't installed, skip this test.
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
if (maxKeyLen <= 128) {
return;
}
Assume.assumeTrue("Please install JCE Unlimited Strength Jurisdiction Policy files for AES 256",
maxKeyLen == 2147483647);
File tikaProt = XSSFTestDataSamples.getSampleFile("protected_passtika.xlsb");
FileInputStream fis = new FileInputStream(tikaProt);
POIFSFileSystem poifs = new POIFSFileSystem(fis);