Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 : #include <sal/config.h>
11 : #include <test/unoapi_test.hxx>
12 : #include <rtl/strbuf.hxx>
13 : #include <osl/file.hxx>
14 :
15 : #include <sfx2/app.hxx>
16 : #include <sfx2/docfilt.hxx>
17 : #include <sfx2/docfile.hxx>
18 : #include <sfx2/sfxmodelfactory.hxx>
19 : #include <svl/intitem.hxx>
20 :
21 : #include <basic/sbxdef.hxx>
22 :
23 : using namespace ::com::sun::star;
24 : using namespace ::com::sun::star::uno;
25 :
26 : #if !defined(MACOSX) && !defined(WNT)
27 :
28 4 : class DBAccessTest : public UnoApiTest
29 : {
30 : public:
31 : DBAccessTest();
32 :
33 : void test();
34 :
35 4 : CPPUNIT_TEST_SUITE(DBAccessTest);
36 2 : CPPUNIT_TEST(test);
37 4 : CPPUNIT_TEST_SUITE_END();
38 :
39 : };
40 :
41 :
42 2 : DBAccessTest::DBAccessTest()
43 2 : : UnoApiTest("/dbaccess/qa/extras/testdocuments")
44 : {
45 2 : }
46 :
47 2 : void DBAccessTest::test()
48 : {
49 2 : const OUString aFileNameBase("testdb.odb");
50 4 : OUString aFileName;
51 2 : createFileURL(aFileNameBase, aFileName);
52 4 : uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
53 4 : CPPUNIT_ASSERT(xComponent.is());
54 2 : }
55 :
56 2 : CPPUNIT_TEST_SUITE_REGISTRATION(DBAccessTest);
57 :
58 : #endif
59 :
60 8 : CPPUNIT_PLUGIN_IMPLEMENT();
61 :
62 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|