Kaydet (Commit) a3fee0ee authored tarafından Jens Carl's avatar Jens Carl

tdf#45904 Move XElementAccess Java tests to C++

Move XElementAccess Java tests to C++ for ScDDELinksObj.

Change-Id: I627a9f54257b9283aadcf7b6b0fbb403b69b4354
Reviewed-on: https://gerrit.libreoffice.org/66558
Tested-by: Jenkins
Reviewed-by: 's avatarJens Carl <j.carl43@gmx.de>
üst 6e07cec3
"ScDDELinksObj";"com::sun::star::container::XElementAccess";"getElementType()"
"ScDDELinksObj";"com::sun::star::container::XElementAccess";"hasElements()"
"ScDDELinksObj";"com::sun::star::container::XEnumerationAccess";"createEnumeration()" "ScDDELinksObj";"com::sun::star::container::XEnumerationAccess";"createEnumeration()"
...@@ -8,9 +8,11 @@ ...@@ -8,9 +8,11 @@
*/ */
#include <test/calc_unoapi_test.hxx> #include <test/calc_unoapi_test.hxx>
#include <test/container/xelementaccess.hxx>
#include <test/container/xindexaccess.hxx> #include <test/container/xindexaccess.hxx>
#include <test/container/xnameaccess.hxx> #include <test/container/xnameaccess.hxx>
#include <cppu/unotype.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <sfx2/app.hxx> #include <sfx2/app.hxx>
...@@ -18,6 +20,7 @@ ...@@ -18,6 +20,7 @@
#include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/sheet/XDDELink.hpp>
#include <com/sun/star/sheet/XDDELinks.hpp> #include <com/sun/star/sheet/XDDELinks.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp> #include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
...@@ -33,6 +36,7 @@ using namespace com::sun::star; ...@@ -33,6 +36,7 @@ using namespace com::sun::star;
namespace sc_apitest namespace sc_apitest
{ {
class ScDDELinksObj : public CalcUnoApiTest, class ScDDELinksObj : public CalcUnoApiTest,
public apitest::XElementAccess,
public apitest::XIndexAccess, public apitest::XIndexAccess,
public apitest::XNameAccess public apitest::XNameAccess
{ {
...@@ -45,6 +49,10 @@ public: ...@@ -45,6 +49,10 @@ public:
CPPUNIT_TEST_SUITE(ScDDELinksObj); CPPUNIT_TEST_SUITE(ScDDELinksObj);
// XElementAccess
CPPUNIT_TEST(testGetElementType);
CPPUNIT_TEST(testHasElements);
// XIndexAccess // XIndexAccess
CPPUNIT_TEST(testGetByIndex); CPPUNIT_TEST(testGetByIndex);
CPPUNIT_TEST(testGetCount); CPPUNIT_TEST(testGetCount);
...@@ -62,6 +70,7 @@ private: ...@@ -62,6 +70,7 @@ private:
ScDDELinksObj::ScDDELinksObj() ScDDELinksObj::ScDDELinksObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments") : CalcUnoApiTest("/sc/qa/extras/testdocuments")
, XElementAccess(cppu::UnoType<sheet::XDDELink>::get())
, XIndexAccess(1) , XIndexAccess(1)
, XNameAccess("soffice|" , XNameAccess("soffice|"
+ m_directories.getURLFromSrc("/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods") + m_directories.getURLFromSrc("/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment