LibreOffice Module test (master)  1
xnamecontainer.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef INCLUDED_TEST_CONTAINER_XNAMECONTAINER_HXX
11 #define INCLUDED_TEST_CONTAINER_XNAMECONTAINER_HXX
12 
13 #include <rtl/ustring.hxx>
14 #include <test/testdllapi.hxx>
15 
16 #include <com/sun/star/uno/XInterface.hpp>
17 
18 #include <com/sun/star/uno/Any.hxx>
19 #include <com/sun/star/uno/Reference.hxx>
20 
21 namespace apitest
22 {
24 {
25 public:
26  // removes default entry
28  : m_aName("XNameContainer")
29  {
30  }
31  // removes given entry
32  XNameContainer(const OUString& rNameToRemove)
33  : m_aName(rNameToRemove)
34  {
35  }
36 
37  virtual css::uno::Reference<css::uno::XInterface> init() = 0;
38  virtual void setElement(const css::uno::Any& rElement) { m_aElement = rElement; }
39 
40  void testInsertByName();
41  void testInsertByNameEmptyName();
42  void testInsertByNameDuplicate();
43  void testInsertByNameInvalidElement();
44  void testRemoveByName();
45  void testRemoveByNameEmptyName();
46  void testRemoveByNameNoneExistingElement();
47 
48 protected:
50 
51 private:
52  OUString m_aName;
53  css::uno::Any m_aElement;
54 };
55 
56 } // namespace apitest
57 
58 #endif // INCLUDED_TEST_CONTAINER_XNAMECONTAINER_HXX
59 
60 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
OUString m_aName
XNameContainer(const OUString &rNameToRemove)
virtual void setElement(const css::uno::Any &rElement)
FILE * init(int, char **)
#define OOO_DLLPUBLIC_TEST
Definition: testdllapi.hxx:28