11#include <rtl/ustring.hxx>
13#include <com/sun/star/container/XNamed.hpp>
14#include <com/sun/star/uno/RuntimeException.hpp>
16#include <com/sun/star/uno/Reference.hxx>
18#include <cppunit/TestAssert.h>
21using namespace css::uno;
27 uno::Reference<container::XNamed> xNamed(
init(), UNO_QUERY_THROW);
28 CPPUNIT_ASSERT_EQUAL(
m_aTestName, xNamed->getName());
33 uno::Reference<container::XNamed> xNamed(
init(), UNO_QUERY_THROW);
34 OUString aTestName(
"NewName");
36 xNamed->setName(aTestName);
37 CPPUNIT_ASSERT_EQUAL(aTestName, xNamed->getName());
41 CPPUNIT_ASSERT_EQUAL(
m_aTestName, xNamed->getName());
46 uno::Reference<container::XNamed> xNamed(
init(), uno::UNO_QUERY_THROW);
47 OUString aTestName(
m_aTestName.replaceAll(
"ScSheetLinkObj",
"NewScSheetLinkObj"));
49 xNamed->setName(aTestName);
50 CPPUNIT_ASSERT_EQUAL(aTestName, xNamed->getName());
54 CPPUNIT_ASSERT_EQUAL(
m_aTestName, xNamed->getName());
59 uno::Reference<container::XNamed> xNamed(
init(), uno::UNO_QUERY_THROW);
61 CPPUNIT_ASSERT_THROW(xNamed->setName(
"NewName"), uno::RuntimeException);
void testSetNameThrowsException()
void testSetNameByScSheetLinkObj()
virtual css::uno::Reference< css::uno::XInterface > init()=0