1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #include "dbtest_base.cxx"
12 #include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
13 #include <com/sun/star/sdbc/XColumnLocate.hpp>
14 #include <com/sun/star/sdbc/XConnection.hpp>
15 #include <com/sun/star/sdbc/XResultSet.hpp>
16 #include <com/sun/star/sdbc/XRow.hpp>
17 #include <com/sun/star/sdbc/XStatement.hpp>
19 using namespace ::com::sun::star
;
20 using namespace ::com::sun::star::sdb
;
21 using namespace ::com::sun::star::sdbc
;
22 using namespace ::com::sun::star::uno
;
28 void testEmptyDBConnection();
30 CPPUNIT_TEST_SUITE(HSQLDBTest
);
31 CPPUNIT_TEST(testEmptyDBConnection
);
32 CPPUNIT_TEST_SUITE_END();
36 * Test the loading of an "empty" file, i.e. the embedded database has not yet
37 * been initialised (as occurs when a new .odb is created and opened by base).
39 void HSQLDBTest::testEmptyDBConnection()
41 uno::Reference
< XOfficeDatabaseDocument
> xDocument
=
42 getDocumentForFileName("hsqldb_empty.odb");
44 getConnectionForDocument(xDocument
);
46 css::uno::Reference
<css::lang::XComponent
>(
47 xDocument
, css::uno::UNO_QUERY_THROW
)->dispose();
50 CPPUNIT_TEST_SUITE_REGISTRATION(HSQLDBTest
);
52 CPPUNIT_PLUGIN_IMPLEMENT();
54 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */