diff options
author | Jens Carl <j.carl43@gmx.de> | 2018-12-04 07:27:25 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2018-12-04 10:18:55 +0100 |
commit | e01b46b4229bfb7ba54127f590dec837d798ebd4 (patch) | |
tree | 1874907a71d96c5c67bfee137a1b3140161c6a18 /include | |
parent | 88b46b8383019d331ae0ddc76afcd5739f511936 (diff) |
tdf#45904 Move XNamed Java tests to C++
Move XNamed Java tests to C++ for ScDDELinkObj and refactor class
XNamed. ScDDELinkObj doesn't allow to set the name, so test that a
exception of type RuntimeException is thrown.
Change-Id: Ie110c3c0ea22d205d4f2c4575f3db3676dda9ce3
Reviewed-on: https://gerrit.libreoffice.org/64497
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/test/container/xnamed.hxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/test/container/xnamed.hxx b/include/test/container/xnamed.hxx index f9f708114f68..1b1a762ef8b4 100644 --- a/include/test/container/xnamed.hxx +++ b/include/test/container/xnamed.hxx @@ -11,7 +11,11 @@ #define INCLUDED_TEST_CONTAINER_XNAMED_HXX #include <rtl/ustring.hxx> + +#include <com/sun/star/uno/XInterface.hpp> + #include <com/sun/star/uno/Reference.hxx> + #include <test/testdllapi.hxx> namespace apitest { @@ -19,16 +23,22 @@ namespace apitest { class OOO_DLLPUBLIC_TEST XNamed { public: - XNamed(const OUString& rName): maTestName(rName) {} - virtual ~XNamed(); + XNamed(const OUString& rTestName) + : m_aTestName(rTestName) + { + } void testGetName(); void testSetName(); + void testSetNameThrowsException(); virtual css::uno::Reference< css::uno::XInterface > init() = 0; -private: - OUString const maTestName; +protected: + ~XNamed() {} + +private: + OUString const m_aTestName; }; } |