LCOV - code coverage report
Current view: top level - lotuswordpro/qa/cppunit - test_lotuswordpro.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 21 21 100.0 %
Date: 2015-06-13 12:38:46 Functions: 15 16 93.8 %
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 <unotest/filters-test.hxx>
      11             : #include <test/bootstrapfixture.hxx>
      12             : #include <com/sun/star/document/XFilter.hpp>
      13             : 
      14             : #include <osl/file.hxx>
      15             : #include <osl/process.h>
      16             : 
      17             : using namespace ::com::sun::star;
      18             : 
      19             : namespace
      20             : {
      21           2 :     class LotusWordProTest
      22             :         : public test::FiltersTest
      23             :         , public test::BootstrapFixture
      24             :     {
      25             :     public:
      26           1 :         LotusWordProTest() : BootstrapFixture(true, false) {}
      27             : 
      28             :         virtual void setUp() SAL_OVERRIDE;
      29             : 
      30             :         virtual bool load(const OUString &,
      31             :             const OUString &rURL, const OUString &,
      32             :             SfxFilterFlags, SotClipboardFormatId, unsigned int) SAL_OVERRIDE;
      33             : 
      34             :         void test();
      35             : 
      36           2 :         CPPUNIT_TEST_SUITE(LotusWordProTest);
      37           1 :         CPPUNIT_TEST(test);
      38           5 :         CPPUNIT_TEST_SUITE_END();
      39             :     private:
      40             :         uno::Reference<document::XFilter> m_xFilter;
      41             :     };
      42             : 
      43           1 :     void LotusWordProTest::setUp()
      44             :     {
      45           1 :         test::BootstrapFixture::setUp();
      46             : 
      47           3 :         m_xFilter = uno::Reference< document::XFilter >(m_xSFactory->createInstance(
      48           1 :             "com.sun.star.comp.Writer.LotusWordProImportFilter"),
      49           1 :             uno::UNO_QUERY_THROW);
      50           1 :     }
      51             : 
      52           6 :     bool LotusWordProTest::load(const OUString &,
      53             :         const OUString &rURL, const OUString &,
      54             :         SfxFilterFlags, SotClipboardFormatId, unsigned int)
      55             :     {
      56           6 :         uno::Sequence< beans::PropertyValue > aDescriptor(1);
      57           6 :         aDescriptor[0].Name = "URL";
      58           6 :         aDescriptor[0].Value <<= rURL;
      59           6 :         return m_xFilter->filter(aDescriptor);
      60             :     }
      61             : 
      62           1 :     void LotusWordProTest::test()
      63             :     {
      64             :         testDir(OUString(),
      65             :             getURLFromSrc("/lotuswordpro/qa/cppunit/data/"),
      66           1 :             OUString());
      67           1 :     }
      68             : 
      69           1 :     CPPUNIT_TEST_SUITE_REGISTRATION(LotusWordProTest);
      70             : }
      71             : 
      72           4 : CPPUNIT_PLUGIN_IMPLEMENT();
      73             : 
      74             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11