aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-07-15 22:52:45 +0000
committerPJ Fanning <fanningpj@apache.org>2022-07-15 22:52:45 +0000
commit64d9a97d44fbc11da9e2b06058fdc0e1dca26b37 (patch)
tree9caf6a34a9ade0db02fa2f81f37a010a4004519a /poi-ooxml
parent01f14a7548bd357557d0fa18589b8c9de2f11c20 (diff)
downloadpoi-64d9a97d44fbc11da9e2b06058fdc0e1dca26b37.tar.gz
poi-64d9a97d44fbc11da9e2b06058fdc0e1dca26b37.zip
[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
Diffstat (limited to 'poi-ooxml')
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java6
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java6
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFComments.java2
3 files changed, 7 insertions, 7 deletions
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java
index 71ff251ede..4999ce40cd 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java
@@ -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();
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java
index c6ce428fd6..8fe55e55c8 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java
@@ -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();
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFComments.java b/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFComments.java
index cefbab0ef4..ea2818c9a3 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFComments.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFComments.java
@@ -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());
}
}