CppunitTest_framework_dispatch: use CPPUNIT_TEST_FIXTURE()

Change-Id: I2de32f700125fc8306c16fe4963ef76f87b0034c
Reviewed-on: https://gerrit.libreoffice.org/68435
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Miklos Vajna 2019-02-27 13:47:33 +01:00
parent c2448e2bce
commit 47ce4b87d8

View file

@ -130,6 +130,7 @@ uno::Reference<frame::XDispatch> MyInterceptor::queryDispatch(const util::URL& r
/// Tests how InterceptionHelper invokes a registered interceptor.
class DispatchTest : public test::BootstrapFixture, public unotest::MacrosTest
{
protected:
uno::Reference<uno::XComponentContext> mxComponentContext;
uno::Reference<lang::XComponent> mxComponent;
void dispatchCommand(const uno::Reference<lang::XComponent>& xComponent, const OUString& rCommand, const uno::Sequence<beans::PropertyValue>& rPropertyValues);
@ -137,11 +138,6 @@ class DispatchTest : public test::BootstrapFixture, public unotest::MacrosTest
public:
virtual void setUp() override;
virtual void tearDown() override;
void testInterception();
CPPUNIT_TEST_SUITE(DispatchTest);
CPPUNIT_TEST(testInterception);
CPPUNIT_TEST_SUITE_END();
};
void DispatchTest::setUp()
@ -174,7 +170,7 @@ void DispatchTest::dispatchCommand(const uno::Reference<lang::XComponent>& xComp
xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
}
void DispatchTest::testInterception()
CPPUNIT_TEST_FIXTURE(DispatchTest, testInterception)
{
mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT(mxComponent.is());
@ -196,8 +192,6 @@ void DispatchTest::testInterception()
CPPUNIT_ASSERT_EQUAL(0, pInterceptor->getUnexpected());
}
CPPUNIT_TEST_SUITE_REGISTRATION(DispatchTest);
}
CPPUNIT_PLUGIN_IMPLEMENT();