summaryrefslogtreecommitdiff
path: root/test/source/sheet
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2017-12-14 19:31:00 +0000
committerJens Carl <j.carl43@gmx.de>2017-12-15 01:55:26 +0100
commitacc24edf21b99822b6e6d8119eba3ab843458401 (patch)
tree811962669f9687b6476be9842a42e2ace9dd7813 /test/source/sheet
parentaac4e447c3fb276a85c475f86d3469b8e34eeb5a (diff)
tdf#45904 Move _XConsolidatable Java tests to C++
Change-Id: Id851121d424e88d28f0c941d50ab115eba5cea18 Reviewed-on: https://gerrit.libreoffice.org/46485 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'test/source/sheet')
-rw-r--r--test/source/sheet/xconsolidatable.cxx46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/source/sheet/xconsolidatable.cxx b/test/source/sheet/xconsolidatable.cxx
new file mode 100644
index 000000000000..f5616e78c43e
--- /dev/null
+++ b/test/source/sheet/xconsolidatable.cxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <test/sheet/xconsolidatable.hxx>
+
+#include <com/sun/star/sheet/GeneralFunction.hpp>
+#include <com/sun/star/sheet/XConsolidatable.hpp>
+#include <com/sun/star/sheet/XConsolidationDescriptor.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace css;
+using namespace css::uno;
+
+namespace apitest
+{
+void XConsolidatable::testCreateConsolidationDescriptor()
+{
+ uno::Reference<sheet::XConsolidatable> xConsolidatable(init(), UNO_QUERY_THROW);
+
+ uno::Reference<sheet::XConsolidationDescriptor> xConsolidationDescriptor(
+ xConsolidatable->createConsolidationDescriptor(true), UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_MESSAGE("Unable to create ConsolidationDescriptor",
+ xConsolidationDescriptor.is());
+}
+
+void XConsolidatable::testConsolidate()
+{
+ uno::Reference<sheet::XConsolidatable> xConsolidatable(init(), UNO_QUERY_THROW);
+
+ uno::Reference<sheet::XConsolidationDescriptor> xConsolidationDescriptor(
+ xConsolidatable->createConsolidationDescriptor(true), UNO_QUERY_THROW);
+
+ xConsolidatable->consolidate(xConsolidationDescriptor);
+ CPPUNIT_ASSERT_MESSAGE("consolidate()", true);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */