aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2023-10-03 06:17:01 +0000
committerDominik Stadler <centic@apache.org>2023-10-03 06:17:01 +0000
commite8e6f671ef055819b0627e0c38fef65e4c6b299d (patch)
tree692911370380d997b977f0d7e5d3ae38ffd81d18 /poi-ooxml
parenta5b4a3504af71ba9c5068842bed1a1fc46fcde85 (diff)
downloadpoi-e8e6f671ef055819b0627e0c38fef65e4c6b299d.tar.gz
poi-e8e6f671ef055819b0627e0c38fef65e4c6b299d.zip
Assert that deleting test-files and entries works in tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912709 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFUnicodeSurrogates.java3
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFUnicodeSurrogates.java3
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java2
3 files changed, 5 insertions, 3 deletions
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFUnicodeSurrogates.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFUnicodeSurrogates.java
index aba3a2f376..360bd0576d 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFUnicodeSurrogates.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFUnicodeSurrogates.java
@@ -18,6 +18,7 @@
package org.apache.poi.xssf.streaming;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
@@ -62,7 +63,7 @@ class TestSXSSFUnicodeSurrogates {
assertEquals(unicodeText, cell2.getStringCellValue());
}
} finally {
- tf.delete();
+ assertTrue(tf.delete());
}
}
}
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFUnicodeSurrogates.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFUnicodeSurrogates.java
index 506e0dead8..48c116eb15 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFUnicodeSurrogates.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFUnicodeSurrogates.java
@@ -18,6 +18,7 @@
package org.apache.poi.xssf.usermodel;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
@@ -61,7 +62,7 @@ class TestXSSFUnicodeSurrogates {
assertEquals(unicodeText, cell2.getStringCellValue());
}
} finally {
- tf.delete();
+ assertTrue(tf.delete());
}
}
}
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
index 8d258bb289..9e1a7cc0f3 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
@@ -1479,7 +1479,7 @@ public final class TestXSSFWorkbook extends BaseTestXWorkbook {
}
assertEquals(2, count);
} finally {
- tempFile.delete();
+ assertTrue(tempFile.delete());
}
}