LCOV - code coverage report
Current view: top level - test/source - unoapi_test.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 18 18 100.0 %
Date: 2015-06-13 12:38:46 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         124 : UnoApiTest::UnoApiTest(const OUString& path)
      20         124 :       : m_aBaseString(path)
      21             : {
      22         124 : }
      23             : 
      24         124 : void UnoApiTest::setUp()
      25             : {
      26         124 :     test::BootstrapFixture::setUp();
      27             : 
      28         124 :     mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) );
      29         124 :     CPPUNIT_ASSERT_MESSAGE("no desktop!", mxDesktop.is());
      30         124 : }
      31             : 
      32         124 : void UnoApiTest::tearDown()
      33             : {
      34         124 :     test::BootstrapFixture::tearDown();
      35         124 : }
      36             : 
      37         138 : void UnoApiTest::createFileURL(const OUString& aFileBase, OUString& rFilePath)
      38             : {
      39         138 :     rFilePath = getSrcRootURL() + m_aBaseString + "/" + aFileBase;
      40         138 : }
      41             : 
      42          30 : void UnoApiTest::closeDocument( uno::Reference< lang::XComponent > xDocument )
      43             : {
      44          30 :     uno::Reference< util::XCloseable > xCloseable(xDocument, UNO_QUERY_THROW);
      45          30 :     xCloseable->close(false);
      46         120 : }
      47             : 
      48             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11