Branch libreoffice-5-0-4
[LibreOffice.git] / include / test / bootstrapfixture.hxx
blob069e470be1564d2a5ed1848e76efb9124045d3af
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 #ifndef INCLUDED_TEST_BOOTSTRAPFIXTURE_HXX
10 #define INCLUDED_TEST_BOOTSTRAPFIXTURE_HXX
12 #include <sal/config.h>
14 #include <rtl/string.hxx>
15 #include <tools/link.hxx>
16 #include <vcl/salctype.hxx>
17 #include <com/sun/star/uno/XComponentContext.hpp>
18 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
19 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
21 #include <cppunit/TestAssert.h>
22 #include <cppunit/TestFixture.h>
23 #include <cppunit/extensions/HelperMacros.h>
24 #include <cppunit/plugin/TestPlugIn.h>
25 #include <unotest/bootstrapfixturebase.hxx>
26 #include <test/testdllapi.hxx>
28 namespace test {
30 enum ValidationFormat
32 OOXML,
33 ODF
36 // Class to do lots of heavy-lifting UNO & environment
37 // bootstrapping for unit tests, such that we can use
38 // almost an entire LibreOffice during compile - so
39 // that we can get pieces of code alone to beat them up.
41 // NB. this class is instantiated multiple times during a
42 // run of unit tests ...
43 class OOO_DLLPUBLIC_TEST BootstrapFixture : public BootstrapFixtureBase
45 bool m_bNeedUCB;
46 bool m_bAssertOnDialog;
48 public:
49 DECL_STATIC_LINK( BootstrapFixture, ImplInitFilterHdl, ConvertData* );
51 BootstrapFixture( bool bAssertOnDialog = true, bool bNeedUCB = true );
52 virtual ~BootstrapFixture();
54 virtual void setUp() SAL_OVERRIDE;
55 virtual void tearDown() SAL_OVERRIDE;
57 static void validate(const OUString& rURL, ValidationFormat);
62 #endif
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */