From 813b650dfbbc85efebe0dca903aa285d48237b85 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 22 Mar 2012 12:43:59 +0000 Subject: tubes test: store OString identifiers This will prevent having to convert them in multiple places. --- tubes/qa/test_manager.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'tubes/qa') diff --git a/tubes/qa/test_manager.cxx b/tubes/qa/test_manager.cxx index ea5806d83a89..da1b3ec88b01 100644 --- a/tubes/qa/test_manager.cxx +++ b/tubes/qa/test_manager.cxx @@ -91,8 +91,8 @@ private: rtl::OUString maTestConfigIniURL; rtl::Bootstrap maTestConfig; - rtl::OUString maAcc1; - rtl::OUString maAcc2; + rtl::OString maOffererIdentifier; + rtl::OString maAccepterIdentifier; }; // static, not members, so they actually survive cppunit test iteration @@ -107,10 +107,15 @@ TestTeleTubes::TestTeleTubes() { TeleManager::addSuffixToNames( "TeleTest"); + rtl::OUString aOffererIdentifier; CPPUNIT_ASSERT_MESSAGE( "See README for how to set up test-config.ini", - maTestConfig.getFrom("offerer", maAcc1)); + maTestConfig.getFrom("offerer", aOffererIdentifier)); + maOffererIdentifier = OUStringToOString( aOffererIdentifier, RTL_TEXTENCODING_UTF8); + + rtl::OUString aAccepterIdentifier; CPPUNIT_ASSERT_MESSAGE( "See README for how to set up test-config.ini", - maTestConfig.getFrom("accepter", maAcc2)); + maTestConfig.getFrom("accepter", aAccepterIdentifier)); + maAccepterIdentifier = OUStringToOString( aAccepterIdentifier, RTL_TEXTENCODING_UTF8); } TestTeleTubes::~TestTeleTubes() @@ -194,9 +199,9 @@ void TestTeleTubes::testPrepareAccountManager2() void TestTeleTubes::testStartBuddySession1() { - TpAccount *pAcc1 = mpManager1->getAccount( OUStringToOString( maAcc1, RTL_TEXTENCODING_UTF8)); + TpAccount *pAcc1 = mpManager1->getAccount(maOffererIdentifier); CPPUNIT_ASSERT ( pAcc1 != 0); - bool bStarted = mpManager1->startBuddySession( pAcc1, maAcc2); + bool bStarted = mpManager1->startBuddySession( pAcc1, maAccepterIdentifier); CPPUNIT_ASSERT( bStarted == true); } -- cgit v1.2.3