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;
assertEquals(unicodeText, cell2.getStringCellValue());
}
} finally {
- tf.delete();
+ assertTrue(tf.delete());
}
}
}
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;
assertEquals(unicodeText, cell2.getStringCellValue());
}
} finally {
- tf.delete();
+ assertTrue(tf.delete());
}
}
}
}
assertEquals(2, count);
} finally {
- tempFile.delete();
+ assertTrue(tempFile.delete());
}
}
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.ByteArrayInputStream;
import java.io.IOException;
summary1.setTitle(title);
//write the modified property back to POIFS
- fs.getRoot().getEntryCaseInsensitive(SummaryInformation.DEFAULT_STREAM_NAME).delete();
+ assertTrue(fs.getRoot().getEntryCaseInsensitive(SummaryInformation.DEFAULT_STREAM_NAME).delete());
fs.createDocument(summary1.toInputStream(), SummaryInformation.DEFAULT_STREAM_NAME);
// check that the information was added successfully to the filesystem object
main4096[4095] = -11;
testDir.createDocument("Normal4096", new ByteArrayInputStream(main4096));
- root.getEntryCaseInsensitive("Tags").delete();
+ assertTrue(root.getEntryCaseInsensitive("Tags").delete());
// Write out, re-load
// Delete a directory, and add one more
- testDir.getEntryCaseInsensitive("Testing 456").delete();
+ assertTrue(testDir.getEntryCaseInsensitive("Testing 456").delete());
testDir.createDirectory("Testing ABC");
// Delete a mini stream, add one more
- testDir.getEntryCaseInsensitive("Mini").delete();
+ assertTrue(testDir.getEntryCaseInsensitive("Mini").delete());
byte[] mini3 = new byte[]{42, 0, 42, 0, 42, 0, 42};
testDir.createDocument("Mini3", new ByteArrayInputStream(mini3));
// Delete a couple of streams
- miniDoc.delete();
- normDoc.delete();
+ assertTrue(miniDoc.delete());
+ assertTrue(normDoc.delete());
// Check - will have un-used sectors now