Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / dbaccess / qa / unit / hsqldb.cxx
blob23fed515194410eef40c0fd088b0cc821c3186ca
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 */
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;
24 class HSQLDBTest
25 : public DBTestBase
27 public:
28 void testEmptyDBConnection();
30 CPPUNIT_TEST_SUITE(HSQLDBTest);
31 CPPUNIT_TEST(testEmptyDBConnection);
32 CPPUNIT_TEST_SUITE_END();
35 /**
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: */