test: change maName to more descriptive variable name
Change-Id: I93b553c74bfa6f046092c6a550d229278e413446 Reviewed-on: https://gerrit.libreoffice.org/20956 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
This commit is contained in:
@@ -19,7 +19,7 @@ namespace apitest {
|
||||
class OOO_DLLPUBLIC_TEST XNamed
|
||||
{
|
||||
public:
|
||||
XNamed(const OUString& rName): maName(rName) {}
|
||||
XNamed(const OUString& rName): maTestName(rName) {}
|
||||
virtual ~XNamed();
|
||||
|
||||
void testGetName();
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
|
||||
virtual css::uno::Reference< css::uno::XInterface > init() = 0;
|
||||
private:
|
||||
OUString maName;
|
||||
OUString maTestName;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -20,7 +20,7 @@ namespace apitest {
|
||||
class OOO_DLLPUBLIC_TEST XNameReplace
|
||||
{
|
||||
public:
|
||||
XNameReplace(const OUString& rName): maName(rName) {}
|
||||
XNameReplace(const OUString& rName): maTestReplacementName(rName) {}
|
||||
|
||||
virtual css::uno::Reference< css::uno::XInterface > init() = 0;
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
virtual ~XNameReplace() {}
|
||||
|
||||
private:
|
||||
OUString maName;
|
||||
OUString maTestReplacementName;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -19,20 +19,20 @@ namespace apitest {
|
||||
void XNamed::testGetName()
|
||||
{
|
||||
uno::Reference< container::XNamed > xNamed(init(), UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT( maName == xNamed->getName() );
|
||||
CPPUNIT_ASSERT( maTestName == xNamed->getName() );
|
||||
}
|
||||
|
||||
void XNamed::testSetName()
|
||||
{
|
||||
uno::Reference< container::XNamed > xNamed(init(), UNO_QUERY_THROW);
|
||||
OUString aName("NewName");
|
||||
OUString aTestName("NewName");
|
||||
|
||||
xNamed->setName(aName);
|
||||
CPPUNIT_ASSERT( aName == xNamed->getName() );
|
||||
xNamed->setName(aTestName);
|
||||
CPPUNIT_ASSERT( aTestName == xNamed->getName() );
|
||||
|
||||
// restore old name
|
||||
xNamed->setName(maName);
|
||||
CPPUNIT_ASSERT(maName == xNamed->getName());
|
||||
xNamed->setName(maTestName);
|
||||
CPPUNIT_ASSERT(maTestName == xNamed->getName());
|
||||
}
|
||||
|
||||
XNamed::~XNamed()
|
||||
|
@@ -19,8 +19,8 @@ namespace apitest {
|
||||
void XNameReplace::testReplaceByName()
|
||||
{
|
||||
uno::Reference< container::XNameReplace > xNameReplace(init(), UNO_QUERY_THROW);
|
||||
xNameReplace->replaceByName(maName, getAnyElementForNameReplace());
|
||||
Any aAny = xNameReplace->getByName( maName );
|
||||
xNameReplace->replaceByName(maTestReplacementName, getAnyElementForNameReplace());
|
||||
Any aAny = xNameReplace->getByName( maTestReplacementName );
|
||||
uno::Reference< uno::XInterface > xElement(aAny, UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT(xElement.is());
|
||||
}
|
||||
|
Reference in New Issue
Block a user