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 2 : class DBAccessTest : public UnoApiTest
29 : {
30 : public:
31 : DBAccessTest();
32 :
33 : void test();
34 :
35 2 : CPPUNIT_TEST_SUITE(DBAccessTest);
36 1 : CPPUNIT_TEST(test);
37 5 : CPPUNIT_TEST_SUITE_END();
38 :
39 : };
40 :
41 :
42 1 : DBAccessTest::DBAccessTest()
43 1 : : UnoApiTest("/dbaccess/qa/extras/testdocuments")
44 : {
45 1 : }
46 :
47 1 : void DBAccessTest::test()
48 : {
49 1 : const OUString aFileNameBase("testdb.odb");
50 2 : OUString aFileName;
51 1 : createFileURL(aFileNameBase, aFileName);
52 2 : uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
53 2 : CPPUNIT_ASSERT(xComponent.is());
54 1 : }
55 :
56 1 : CPPUNIT_TEST_SUITE_REGISTRATION(DBAccessTest);
57 :
58 : #endif
59 :
60 4 : CPPUNIT_PLUGIN_IMPLEMENT();
61 :
62 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|