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

Generated by: LCOV version 1.10