From 1db206fb552f148432a71b5a59f99bc32b79a09d Mon Sep 17 00:00:00 2001 From: fgerlits Date: Mon, 25 Sep 2006 14:42:14 +0000 Subject: [PATCH] adding a new test; related to ticket #1809 --- .../src/WebStorageClientTest.cxx | 29 +++++++++++++++++++ .../storageClient/src/WebStorageClientTest.h | 9 ++++++ .../storageServer/var/tests/mdata1.xml | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/livesupport/src/modules/storageClient/src/WebStorageClientTest.cxx b/livesupport/src/modules/storageClient/src/WebStorageClientTest.cxx index f00024e5a..c993ec3cb 100644 --- a/livesupport/src/modules/storageClient/src/WebStorageClientTest.cxx +++ b/livesupport/src/modules/storageClient/src/WebStorageClientTest.cxx @@ -750,6 +750,35 @@ WebStorageClientTest :: searchTest(void) } +/*------------------------------------------------------------------------------ + * Another search test. + *----------------------------------------------------------------------------*/ +void +WebStorageClientTest :: searchUnicodeTest(void) + throw (CPPUNIT_NS::Exception) +{ + try { + wsc->reset(); + } catch (XmlRpcException &e) { + CPPUNIT_FAIL(e.what()); + } + Ptr::Ref> >::Ref searchResults + = wsc->getSearchResults(); + CPPUNIT_ASSERT(searchResults->size() >= 9); + Ptr::Ref audioClip1 = searchResults->at(4)->getAudioClip(); + + CPPUNIT_ASSERT(audioClip1); + + Ptr::Ref creator; + CPPUNIT_ASSERT_NO_THROW( + creator = audioClip1->getMetadata("dc:creator") + ); + CPPUNIT_ASSERT( + *creator == "János Kőbor" + ); +} + + /*------------------------------------------------------------------------------ * Browse test. *----------------------------------------------------------------------------*/ diff --git a/livesupport/src/modules/storageClient/src/WebStorageClientTest.h b/livesupport/src/modules/storageClient/src/WebStorageClientTest.h index 0e0cfebc7..2ff469c98 100644 --- a/livesupport/src/modules/storageClient/src/WebStorageClientTest.h +++ b/livesupport/src/modules/storageClient/src/WebStorageClientTest.h @@ -77,6 +77,7 @@ class WebStorageClientTest : public BaseTestMethod CPPUNIT_TEST(embeddedPlaylistTest); CPPUNIT_TEST(audioClipTest); CPPUNIT_TEST(searchTest); + CPPUNIT_TEST(searchUnicodeTest); CPPUNIT_TEST(getAllTest); CPPUNIT_TEST(browseTest); CPPUNIT_TEST(createBackupTest); @@ -164,6 +165,14 @@ class WebStorageClientTest : public BaseTestMethod void searchTest(void) throw (CPPUNIT_NS::Exception); + /** + * Testing the search operations. + * + * @exception CPPUNIT_NS::Exception on test failures. + */ + void + searchUnicodeTest(void) throw (CPPUNIT_NS::Exception); + /** * Testing getAllPlaylists() and getAllAudioClips(). * diff --git a/livesupport/src/modules/storageServer/var/tests/mdata1.xml b/livesupport/src/modules/storageServer/var/tests/mdata1.xml index e5c713b34..eda33d795 100644 --- a/livesupport/src/modules/storageServer/var/tests/mdata1.xml +++ b/livesupport/src/modules/storageServer/var/tests/mdata1.xml @@ -19,6 +19,6 @@ gunid here Spatial Coverage Temporal Covarage - John X1 + János Kőbor