diff options
author | Jens Carl <j.carl43@gmx.de> | 2019-02-26 21:43:29 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2019-02-27 09:39:42 +0100 |
commit | 4b98337699e5e59a543d95c73ea7c64b3d9a1caf (patch) | |
tree | bfaf0cb51e942c2b3c5207e7d5403270c53b337b /include | |
parent | 48dc1e48d0fed5e00a3e4b5edf11a90fcc55b5ed (diff) |
Add missing XNameContainer tests to ScDataPilotFieldGroupsObj
Change-Id: Ia59b2a6136e2e56bf6c43a84e3cb6268471278a5
Reviewed-on: https://gerrit.libreoffice.org/68410
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/test/container/xnamecontainer.hxx | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/include/test/container/xnamecontainer.hxx b/include/test/container/xnamecontainer.hxx index 9ff614473795..6c0b24d20e0d 100644 --- a/include/test/container/xnamecontainer.hxx +++ b/include/test/container/xnamecontainer.hxx @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * @@ -11,31 +11,50 @@ #define INCLUDED_TEST_CONTAINER_XNAMECONTAINER_HXX #include <rtl/ustring.hxx> -#include <com/sun/star/uno/Reference.hxx> #include <test/testdllapi.hxx> -namespace apitest { +#include <com/sun/star/uno/XInterface.hpp> + +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/uno/Reference.hxx> +namespace apitest +{ class OOO_DLLPUBLIC_TEST XNameContainer { public: // removes default entry - XNameContainer(); + XNameContainer() + : m_aName("XNameContainer") + { + } // removes given entry - XNameContainer(const OUString& rName); - - virtual css::uno::Reference< css::uno::XInterface > init() = 0; - + XNameContainer(const OUString& rNameToRemove) + : m_aName(rNameToRemove) + { + } + + virtual css::uno::Reference<css::uno::XInterface> init() = 0; + virtual void setElement(const css::uno::Any& rElement) { m_aElement = rElement; } + + void testInsertByName(); + void testInsertByNameEmptyName(); + void testInsertByNameDuplicate(); + void testInsertByNameInvalidElement(); void testRemoveByName(); + void testRemoveByNameEmptyName(); + void testRemoveByNameNoneExistingElement(); - virtual ~XNameContainer() {} +protected: + ~XNameContainer() {} private: - OUString const maNameToRemove; + OUString const m_aName; + css::uno::Any m_aElement; }; -} +} // namespace apitest #endif // INCLUDED_TEST_CONTAINER_XNAMECONTAINER_HXX -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |