aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2023-06-16 19:05:58 +0000
committerPJ Fanning <fanningpj@apache.org>2023-06-16 19:05:58 +0000
commit3bf427611731a1f2be73e4b77d60800645023185 (patch)
tree32d630a4a34a6844f9f01de2248e886cbcce4958 /poi-ooxml
parent5cafcdc83e5bc955109dd89fdca3b4831c77a6f4 (diff)
downloadpoi-3bf427611731a1f2be73e4b77d60800645023185.tar.gz
poi-3bf427611731a1f2be73e4b77d60800645023185.zip
xddf test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910459 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xddf/usermodel/chart/TestXDDFChart.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xddf/usermodel/chart/TestXDDFChart.java b/poi-ooxml/src/test/java/org/apache/poi/xddf/usermodel/chart/TestXDDFChart.java
index 45ff5d7747..ba2eeba153 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xddf/usermodel/chart/TestXDDFChart.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xddf/usermodel/chart/TestXDDFChart.java
@@ -48,6 +48,36 @@ class TestXDDFChart {
}
@Test
+ void testSetMajorUnit() {
+ // minimal test to cause ooxml-lite to include all the classes in poi-ooxml-lite
+ XDDFChart xddfChart = newXDDFChart();
+
+ XDDFValueAxis xAxis = xddfChart.createValueAxis(AxisPosition.BOTTOM);
+ XDDFValueAxis yAxis = xddfChart.createValueAxis(AxisPosition.LEFT);
+ assertNotNull(xAxis);
+ assertNotNull(yAxis);
+
+ xAxis.setTitle("Seconds Into Run");
+ final double xAxisMajorUnits = 300.0;
+ xAxis.setMajorUnit(xAxisMajorUnits);
+ assertEquals(xAxisMajorUnits, xAxis.getMajorUnit());
+ final double yAxisMajorUnits = 100.0;
+ yAxis.setMinorUnit(yAxisMajorUnits);
+ assertEquals(yAxisMajorUnits, yAxis.getMinorUnit());
+
+ xAxis.setOrientation(AxisOrientation.MAX_MIN);
+ assertEquals(AxisOrientation.MAX_MIN, xAxis.getOrientation());
+ yAxis.setOrientation(AxisOrientation.MIN_MAX);
+ assertEquals(AxisOrientation.MIN_MAX, yAxis.getOrientation());
+
+ xAxis.setCrosses(AxisCrosses.AUTO_ZERO);
+ assertEquals(AxisCrosses.AUTO_ZERO, xAxis.getCrosses());
+
+ yAxis.setCrossBetween(AxisCrossBetween.BETWEEN);
+ assertEquals(AxisCrossBetween.BETWEEN, yAxis.getCrosses());
+ }
+
+ @Test
void testSetExternalId() {
XDDFChart xddfChart = newXDDFChart();
CTChartSpace ctChartSpace = xddfChart.getCTChartSpace();