mirror of https://github.com/apache/poi.git
[github-349] tidy up some test assertions. Thanks to XenoAmess. This closes #349
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902757 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
01f14a7548
commit
64d9a97d44
|
@ -18,7 +18,7 @@ package org.apache.poi.xssf.usermodel.charts;
|
|||
|
||||
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 static org.junit.jupiter.api.Assertions.assertSame;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -50,7 +50,7 @@ class TestXSSFLineChartData {
|
|||
};
|
||||
|
||||
@Test
|
||||
void testOneSeriePlot() throws IOException {
|
||||
void testOneSeriesPlot() throws IOException {
|
||||
XSSFWorkbook wb = new XSSFWorkbook();
|
||||
XSSFSheet sheet = (XSSFSheet) new SheetBuilder(wb, plotData).build();
|
||||
XSSFDrawing drawing = sheet.createDrawingPatriarch();
|
||||
|
@ -68,7 +68,7 @@ class TestXSSFLineChartData {
|
|||
|
||||
assertNotNull(series);
|
||||
assertEquals(1, lineChartData.getSeriesCount());
|
||||
assertTrue(lineChartData.getSeries(0) == series);
|
||||
assertSame(series, lineChartData.getSeries(0));
|
||||
|
||||
chart.plot(lineChartData);
|
||||
wb.close();
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.poi.xssf.usermodel.charts;
|
|||
|
||||
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 static org.junit.jupiter.api.Assertions.assertSame;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -52,7 +52,7 @@ public final class TestXSSFScatterChartData {
|
|||
};
|
||||
|
||||
@Test
|
||||
void testOneSeriePlot() throws IOException {
|
||||
void testOneSeriesPlot() throws IOException {
|
||||
XSSFWorkbook wb = new XSSFWorkbook();
|
||||
XSSFSheet sheet = (XSSFSheet) new SheetBuilder(wb, plotData).build();
|
||||
XSSFDrawing drawing = sheet.createDrawingPatriarch();
|
||||
|
@ -71,7 +71,7 @@ public final class TestXSSFScatterChartData {
|
|||
assertEquals(ScatterStyle.LINE_MARKER, scatterChartData.getStyle());
|
||||
assertNotNull(series);
|
||||
assertEquals(1, scatterChartData.getSeriesCount());
|
||||
assertTrue(scatterChartData.getSeries(0) == series);
|
||||
assertSame(series, scatterChartData.getSeries(0));
|
||||
|
||||
chart.plot(scatterChartData);
|
||||
wb.close();
|
||||
|
|
|
@ -55,7 +55,7 @@ class TestXWPFComments {
|
|||
assertNotNull(docIn.getDocComments());
|
||||
assertEquals(1, docIn.getComments().length);
|
||||
comment = docIn.getCommentByID("0");
|
||||
assertTrue(null != comment);
|
||||
assertNotNull(comment);
|
||||
assertEquals("Author", comment.getAuthor());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ public abstract class BaseTestRangeCopier {
|
|||
assertEquals(cellContent, getCellContent(destSheet, "D6"));
|
||||
assertFalse(destSheet.getMergedRegions().isEmpty());
|
||||
destSheet.getMergedRegions().forEach((mergedRegion) -> {
|
||||
assertTrue(mergedRegion.equals(mergedRangeAddress));
|
||||
assertEquals(mergedRangeAddress, mergedRegion);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue