adding a new test; related to ticket #1809
This commit is contained in:
parent
d35ce474f5
commit
1db206fb55
|
@ -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<std::vector<Ptr<Playable>::Ref> >::Ref searchResults
|
||||
= wsc->getSearchResults();
|
||||
CPPUNIT_ASSERT(searchResults->size() >= 9);
|
||||
Ptr<AudioClip>::Ref audioClip1 = searchResults->at(4)->getAudioClip();
|
||||
|
||||
CPPUNIT_ASSERT(audioClip1);
|
||||
|
||||
Ptr<Glib::ustring>::Ref creator;
|
||||
CPPUNIT_ASSERT_NO_THROW(
|
||||
creator = audioClip1->getMetadata("dc:creator")
|
||||
);
|
||||
CPPUNIT_ASSERT(
|
||||
*creator == "János Kőbor"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Browse test.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
|
@ -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().
|
||||
*
|
||||
|
|
|
@ -19,6 +19,6 @@
|
|||
<dc:identifier>gunid here</dc:identifier>
|
||||
<dcterms:spatial>Spatial Coverage</dcterms:spatial>
|
||||
<dcterms:temporal>Temporal Covarage</dcterms:temporal>
|
||||
<dc:creator>John X1</dc:creator>
|
||||
<dc:creator>János Kőbor</dc:creator>
|
||||
</metadata>
|
||||
</audioClip>
|
||||
|
|
Loading…
Reference in New Issue