aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/testcases/org/apache
diff options
context:
space:
mode:
authorAlain Béarez <abearez@apache.org>2021-01-24 20:01:36 +0000
committerAlain Béarez <abearez@apache.org>2021-01-24 20:01:36 +0000
commited836507e50e5f12a0204652863f7002fa243b52 (patch)
treec18a0aaecd341ad0b43e0cf2de8db78b3ff3477d /src/ooxml/testcases/org/apache
parent54fde895e66a402b41455ff5c181bd91d811d35d (diff)
downloadpoi-ed836507e50e5f12a0204652863f7002fa243b52.tar.gz
poi-ed836507e50e5f12a0204652863f7002fa243b52.zip
Replace deprecated methods used in tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885886 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/testcases/org/apache')
-rw-r--r--src/ooxml/testcases/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java4
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java4
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java4
-rw-r--r--src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java b/src/ooxml/testcases/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java
index 6f49a18dca..ca5c40aaf1 100644
--- a/src/ooxml/testcases/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java
+++ b/src/ooxml/testcases/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java
@@ -117,7 +117,7 @@ class TestXDDFChartRemoveSeries {
}
/**
- * Remove the first series by calling chartData.getSeries().remove(0).
+ * Attempt to remove the first series by calling chartData.getSeries().remove(0).
* <p>
* This used to corrupt the workbook but the returned <code>List</code> is unmodifiable.
*/
@@ -171,4 +171,4 @@ class TestXDDFChartRemoveSeries {
assertEquals(2, chartData.getSeriesCount());
}
-} \ No newline at end of file
+}
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java
index faa4cb0fc2..71ff251ede 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java
@@ -67,8 +67,8 @@ class TestXSSFLineChartData {
XDDFChartData.Series series = lineChartData.addSeries(xs, ys);
assertNotNull(series);
- assertEquals(1, lineChartData.getSeries().size());
- assertTrue(lineChartData.getSeries().contains(series));
+ assertEquals(1, lineChartData.getSeriesCount());
+ assertTrue(lineChartData.getSeries(0) == series);
chart.plot(lineChartData);
wb.close();
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java
index 5866c33754..16f0fa68fe 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java
@@ -70,8 +70,8 @@ public final class TestXSSFScatterChartData {
assertEquals(ScatterStyle.LINE_MARKER, scatterChartData.getStyle());
assertNotNull(series);
- assertEquals(1, scatterChartData.getSeries().size());
- assertTrue(scatterChartData.getSeries().contains(series));
+ assertEquals(1, scatterChartData.getSeriesCount());
+ assertTrue(scatterChartData.getSeries(0) == series);
chart.plot(scatterChartData);
wb.close();
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java
index c01846636c..eca90582e9 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java
@@ -56,7 +56,7 @@ class TestXWPFChart {
assertEquals(1, chart.getChartSeries().size());
XDDFChartData data = chart.getChartSeries().get(0);
assertEquals(XDDFBarChartData.class, data.getClass());
- assertEquals(3, data.getSeries().size());
+ assertEquals(3, data.getSeriesCount());
}
/**