summaryrefslogtreecommitdiff
path: root/test/source
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2019-05-04 06:27:17 +0000
committerJens Carl <j.carl43@gmx.de>2019-05-04 17:37:47 +0200
commit35608a192df5529d8a0df4ad2f6bce42fc64a9ab (patch)
tree6f382ef813563f9b5aa43a90f645c16963443cc0 /test/source
parent2ddc66e6981a7d819cd6196a7ccbc811ca213be2 (diff)
tdf#45904 Move XComponent Java tests to C++
Move XComponent Java tests to C++ for ScShapeObj. Change-Id: Ib692827729dbe38eaceb76aa042d76e14d9614f8 Reviewed-on: https://gerrit.libreoffice.org/71787 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'test/source')
-rw-r--r--test/source/lang/xcomponent.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/source/lang/xcomponent.cxx b/test/source/lang/xcomponent.cxx
index 386fa45f232f..ef0049d5953c 100644
--- a/test/source/lang/xcomponent.cxx
+++ b/test/source/lang/xcomponent.cxx
@@ -57,6 +57,16 @@ void XComponent::testRemoveEventListener()
CPPUNIT_ASSERT_EQUAL(false, pListenerAddedAndRemoved->m_hasDisposingCalled);
}
+void XComponent::testDispose()
+{
+ Reference<lang::XComponent> xComponent(init(), uno::UNO_QUERY_THROW);
+ auto pListenerAdded(new TestEventListener());
+ Reference<lang::XEventListener> xListenerAdded(pListenerAdded);
+ xComponent->addEventListener(xListenerAdded);
+ xComponent->dispose();
+ CPPUNIT_ASSERT_EQUAL(true, pListenerAdded->m_hasDisposingCalled);
+}
+
void XComponent::testDisposedByDesktopTerminate()
{
Reference<lang::XComponent> xComponent(init(), uno::UNO_QUERY_THROW);