@Test
void testDuplicateFileReadAsOPCFile() {
assertThrows(InvalidFormatException.class, () -> {
- try (OPCPackage pkg = OPCPackage.open(getSampleFile("duplicate-file.xlsx"), PackageAccess.READ)) {
+ try (OPCPackage pkg = OPCPackage.open(getSampleFile("duplicate-filename.xlsx"), PackageAccess.READ)) {
// expect exception here
}
});
@Test
void testDuplicateFileReadAsFile() {
assertThrows(InvalidFormatException.class, () -> {
- try (XSSFWorkbook wb = new XSSFWorkbook(getSampleFile("duplicate-file.xlsx"))) {
+ try (XSSFWorkbook wb = new XSSFWorkbook(getSampleFile("duplicate-filename.xlsx"))) {
// expect exception here
}
});
@Test
void testDuplicateFileReadAsStream() {
assertThrows(InvalidZipException.class, () -> {
- try (XSSFWorkbook wb = new XSSFWorkbook(openSampleFileStream("duplicate-file.xlsx"))) {
+ try (XSSFWorkbook wb = new XSSFWorkbook(openSampleFileStream("duplicate-filename.xlsx"))) {
// expect exception here
}
});