LCOV - code coverage report
Current view: top level - test/source - unoapi_test.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 18 18 100.0 %
Date: 2014-04-11 Functions: 7 7 100.0 %
Legend: Lines: hit not hit

          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 "test/unoapi_test.hxx"
      11             : 
      12             : #include <com/sun/star/util/XCloseable.hpp>
      13             : #include <com/sun/star/frame/Desktop.hpp>
      14             : #include <comphelper/processfactory.hxx>
      15             : 
      16             : using namespace css;
      17             : using namespace css::uno;
      18             : 
      19         110 : UnoApiTest::UnoApiTest(const OUString& path)
      20         110 :       : m_aBaseString(path)
      21             : {
      22         110 : }
      23             : 
      24         110 : void UnoApiTest::setUp()
      25             : {
      26         110 :     test::BootstrapFixture::setUp();
      27             : 
      28         110 :     mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) );
      29         110 :     CPPUNIT_ASSERT_MESSAGE("no desktop!", mxDesktop.is());
      30         110 : }
      31             : 
      32         110 : void UnoApiTest::tearDown()
      33             : {
      34         110 :     test::BootstrapFixture::tearDown();
      35         110 : }
      36             : 
      37         122 : void UnoApiTest::createFileURL(const OUString& aFileBase, OUString& rFilePath)
      38             : {
      39         122 :     rFilePath = getSrcRootURL() + m_aBaseString + "/" + aFileBase;
      40         122 : }
      41             : 
      42          13 : void UnoApiTest::closeDocument( uno::Reference< lang::XComponent > xDocument )
      43             : {
      44          13 :     uno::Reference< util::XCloseable > xCloseable(xDocument, UNO_QUERY_THROW);
      45          13 :     xCloseable->close(false);
      46          73 : }
      47             : 
      48             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10