diff options
author | Jens Carl <j.carl43@gmx.de> | 2019-03-29 00:30:18 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2019-03-29 02:47:05 +0100 |
commit | d757b121e3f0f5de03da1be430ed51bf830dce67 (patch) | |
tree | e1aac974bbeec03e7cf568df460db46202d7d52e /test | |
parent | 8d45d5ee399d0148672e79c379f5d29e1c8ba6f3 (diff) |
tdf#45904 Move XNamed Java tests to C++
Move XNamed Java tests to C++ for ScSheetLinkObj.
Change-Id: I64904ed6bae1b96767f8b0a65b0850a8694b10c2
Reviewed-on: https://gerrit.libreoffice.org/69907
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'test')
-rw-r--r-- | test/source/container/xnamed.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/source/container/xnamed.cxx b/test/source/container/xnamed.cxx index c8234f6dde4f..3b8023b6bc95 100644 --- a/test/source/container/xnamed.cxx +++ b/test/source/container/xnamed.cxx @@ -8,6 +8,7 @@ */ #include <test/container/xnamed.hxx> +#include <rtl/ustring.hxx> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/uno/RuntimeException.hpp> @@ -40,6 +41,19 @@ void XNamed::testSetName() CPPUNIT_ASSERT_EQUAL(m_aTestName, xNamed->getName()); } +void XNamed::testSetNameByScSheetLinkObj() +{ + uno::Reference<container::XNamed> xNamed(init(), uno::UNO_QUERY_THROW); + OUString aTestName(m_aTestName.replaceAll("ScSheetLinkObj", "NewScSheetLinkObj")); + + xNamed->setName(aTestName); + CPPUNIT_ASSERT_EQUAL(aTestName, xNamed->getName()); + + // restore old name + xNamed->setName(m_aTestName); + CPPUNIT_ASSERT_EQUAL(m_aTestName, xNamed->getName()); +} + void XNamed::testSetNameThrowsException() { uno::Reference<container::XNamed> xNamed(init(), uno::UNO_QUERY_THROW); |