diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-11-01 20:29:27 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-11-01 21:52:38 +0100 |
commit | e76cc516135736d2ae1cfe3c178cacd05a7abbcc (patch) | |
tree | 2bb1733217315d6a6e5174936270d58e2036d3a1 /sfx2 | |
parent | 94437397f544a0ffaed52b2def13870881138ce9 (diff) |
CppunitTest_sfx2_classification: inherit from UnoApiTest
Change-Id: Iab05ead4aecc619c41cac7cfcfa8e3f57ef21601
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142123
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/CppunitTest_sfx2_classification.mk | 1 | ||||
-rw-r--r-- | sfx2/qa/cppunit/test_classification.cxx | 28 |
2 files changed, 8 insertions, 21 deletions
diff --git a/sfx2/CppunitTest_sfx2_classification.mk b/sfx2/CppunitTest_sfx2_classification.mk index 303d3099d9a7..90e2061009ae 100644 --- a/sfx2/CppunitTest_sfx2_classification.mk +++ b/sfx2/CppunitTest_sfx2_classification.mk @@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sfx2_classification, \ unotest \ vcl \ sal \ + subsequenttest \ sfx \ )) diff --git a/sfx2/qa/cppunit/test_classification.cxx b/sfx2/qa/cppunit/test_classification.cxx index 45d2947882f3..ffa90089fd8d 100644 --- a/sfx2/qa/cppunit/test_classification.cxx +++ b/sfx2/qa/cppunit/test_classification.cxx @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <test/bootstrapfixture.hxx> -#include <unotest/macros_test.hxx> +#include <test/unoapi_test.hxx> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/frame/Desktop.hpp> @@ -24,14 +23,16 @@ namespace { /// Tests the handling of the .uno:ClassificationApply command in various applications. -class ClassificationTest : public test::BootstrapFixture, public unotest::MacrosTest +class ClassificationTest : public UnoApiTest { - uno::Reference<lang::XComponent> mxComponent; void testClassification(); public: - virtual void setUp() override; - virtual void tearDown() override; + ClassificationTest() + : UnoApiTest("/sfx2/qa/cppunit/data/") + { + } + void testWriter(); void testCalc(); void testImpress(); @@ -43,21 +44,6 @@ public: CPPUNIT_TEST_SUITE_END(); }; -void ClassificationTest::setUp() -{ - test::BootstrapFixture::setUp(); - - mxDesktop.set(frame::Desktop::create(mxComponentContext)); -} - -void ClassificationTest::tearDown() -{ - if (mxComponent.is()) - mxComponent->dispose(); - - test::BootstrapFixture::tearDown(); -} - void ClassificationTest::testClassification() { uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( |