This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git
The following commit(s) were added to refs/heads/trunk by this push:
new ca95db92e5 Add missing @Test annotation to
TestRangeReplacement.testOpen (#1502)
ca95db92e5 is described below
commit ca95db92e50bc45914c38cd9dd5c93e5fd21c297
Author: PJ Fanning <[email protected]>
AuthorDate: Wed Oct 28 22:31:37 2026 +0000
Add missing @Test annotation to TestRangeReplacement.testOpen (#1502)
Add missing @Test annotations to TestSheetText and TestRangeReplacement
testSheetTwo, testWithShortTextPropData and testOpen date from JUnit 3,
where
the test prefix was enough, and have not run since the move to annotations.
testOpen now also closes the document it opens.
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.../java/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java
b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java
index 32b1cf45a3..1c1770b9dd 100644
---
a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java
+++
b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java
@@ -19,6 +19,7 @@ package org.apache.poi.hwpf.usermodel;
import static org.apache.poi.hwpf.HWPFTestDataSamples.openSampleFile;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.io.IOException;
@@ -47,8 +48,11 @@ public final class TestRangeReplacement {
/**
* Test just opening the files
*/
- void testOpen() {
- openSampleFile(illustrativeDocFile);
+ @Test
+ void testOpen() throws IOException {
+ try (HWPFDocument doc = openSampleFile(illustrativeDocFile)) {
+ assertNotNull(doc);
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]