tdf#45904 Move XElementAccess Java tests to C++
Move XElementAccess Java tests to C++ for ScDataPilotFieldGroupsObj.
Change-Id: Ib43c37dd78fa6b4da87a8c0ccd987bf4ee6879de
Reviewed-on: https://gerrit.libreoffice.org/67705
Tested-by: Jenkins
Reviewed-by: Jens Carl <[email protected]>
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldGroupsObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldGroupsObj.csv
index 9ed530a..d41a5dd 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldGroupsObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldGroupsObj.csv
@@ -1,3 +1 @@
"ScDataPilotFieldGroupsObj";"com::sun::star::container::XElementAccess";"getElementType()"
"ScDataPilotFieldGroupsObj";"com::sun::star::container::XElementAccess";"hasElements()"
"ScDataPilotFieldGroupsObj";"com::sun::star::container::XEnumerationAccess";"createEnumeration()"
diff --git a/sc/qa/extras/scdatapilotfieldgroupsobj.cxx b/sc/qa/extras/scdatapilotfieldgroupsobj.cxx
index 4459db9..0f69233 100644
--- a/sc/qa/extras/scdatapilotfieldgroupsobj.cxx
+++ b/sc/qa/extras/scdatapilotfieldgroupsobj.cxx
@@ -8,6 +8,7 @@
*/
#include <test/calc_unoapi_test.hxx>
#include <test/container/xelementaccess.hxx>
#include <test/container/xindexaccess.hxx>
#include <test/container/xnameaccess.hxx>
@@ -16,6 +17,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/sheet/DataPilotFieldGroupInfo.hpp>
@@ -42,6 +44,7 @@ namespace sc_apitest
const auto nMaxFieldIndex = 6;
class ScDataPilotFieldGroupItemObj : public CalcUnoApiTest,
public apitest::XElementAccess,
public apitest::XIndexAccess,
public apitest::XNameAccess
{
@@ -54,6 +57,10 @@ public:
CPPUNIT_TEST_SUITE(ScDataPilotFieldGroupItemObj);
// XElementAccess
CPPUNIT_TEST(testGetElementType);
CPPUNIT_TEST(testHasElements);
// XIndexAccess
CPPUNIT_TEST(testGetByIndex);
CPPUNIT_TEST(testGetCount);
@@ -71,6 +78,7 @@ private:
ScDataPilotFieldGroupItemObj::ScDataPilotFieldGroupItemObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
, XElementAccess(cppu::UnoType<container::XNameAccess>::get())
, XIndexAccess(1)
, XNameAccess("Group1")
{