diff --git a/livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h b/livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h index 5955f8c5b..bc29bfcf2 100644 --- a/livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h +++ b/livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.2 $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/Attic/StorageClientInterface.h,v $ ------------------------------------------------------------------------------*/ @@ -61,7 +61,7 @@ namespace Core { * An interface for storage clients. * * @author $Author: fgerlits $ - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ class StorageClientInterface { @@ -101,6 +101,16 @@ class StorageClientInterface deletePlaylist(Ptr::Ref id) throw (std::invalid_argument) = 0; + + /** + * Return a list of all playlists in the playlist store. + * + * @param (none). + * @return a vector containing the playlists. + */ + virtual Ptr::Ref> >::Ref + getAllPlaylists(void) const throw () = 0; + }; diff --git a/livesupport/modules/storage/src/TestStorageClient.cxx b/livesupport/modules/storage/src/TestStorageClient.cxx index ae53713f1..d5bb26229 100644 --- a/livesupport/modules/storage/src/TestStorageClient.cxx +++ b/livesupport/modules/storage/src/TestStorageClient.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.2 $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.cxx,v $ ------------------------------------------------------------------------------*/ @@ -132,3 +132,21 @@ TestStorageClient :: deletePlaylist(Ptr::Ref id) } +/*------------------------------------------------------------------------------ + * Return a listing of all the playlists in the playlist store. + *----------------------------------------------------------------------------*/ +Ptr::Ref> >::Ref +TestStorageClient :: getAllPlaylists(void) const + throw () +{ + PlaylistMap::const_iterator it = playlistMap.begin(); + Ptr::Ref> >::Ref + playlistVector (new std::vector::Ref>); + + while (it != playlistMap.end()) { + playlistVector->push_back(it->second); // TODO: check this + ++it; + } + + return playlistVector; +} diff --git a/livesupport/modules/storage/src/TestStorageClient.h b/livesupport/modules/storage/src/TestStorageClient.h index 64fa93653..4aa023aa7 100644 --- a/livesupport/modules/storage/src/TestStorageClient.h +++ b/livesupport/modules/storage/src/TestStorageClient.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.2 $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $ ------------------------------------------------------------------------------*/ @@ -67,7 +67,7 @@ using namespace LiveSupport::Core; * A dummy storage client, only used for test purposes. * * @author $Author: fgerlits $ - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ class TestStorageClient : virtual public Configurable, @@ -159,6 +159,16 @@ class TestStorageClient : virtual void deletePlaylist(Ptr::Ref id) throw (std::invalid_argument); + + /** + * Return a list of all playlists in the playlist store. + * + * @param (none). + * @return a vector containing the playlists. + */ + virtual Ptr::Ref> >::Ref + getAllPlaylists(void) const throw (); + }; diff --git a/livesupport/modules/storage/src/TestStorageClientTest.cxx b/livesupport/modules/storage/src/TestStorageClientTest.cxx index fef16e3aa..b2872c088 100644 --- a/livesupport/modules/storage/src/TestStorageClientTest.cxx +++ b/livesupport/modules/storage/src/TestStorageClientTest.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.2 $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClientTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -144,3 +144,19 @@ TestStorageClientTest :: deletePlaylistTest(void) } catch (std::invalid_argument &e) { } } + + +/*------------------------------------------------------------------------------ + * Testing the getAllPlaylists method + *----------------------------------------------------------------------------*/ +void +TestStorageClientTest :: getAllPlaylistsTest(void) + throw (CPPUNIT_NS::Exception) +{ + Ptr::Ref> >::Ref playlistVector = + tsc->getAllPlaylists(); + CPPUNIT_ASSERT(playlistVector->size() == 1); + + Ptr::Ref playlist = (*playlistVector)[0]; + CPPUNIT_ASSERT((int) (playlist->getId()->getId()) == 1); +} diff --git a/livesupport/modules/storage/src/TestStorageClientTest.h b/livesupport/modules/storage/src/TestStorageClientTest.h index bd3a12e15..26ef9987b 100644 --- a/livesupport/modules/storage/src/TestStorageClientTest.h +++ b/livesupport/modules/storage/src/TestStorageClientTest.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.2 $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClientTest.h,v $ ------------------------------------------------------------------------------*/ @@ -58,13 +58,14 @@ namespace Storage { * Unit test for the UploadPlaylistMetohd class. * * @author $Author: fgerlits $ - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ * @see TestStorageClient */ class TestStorageClientTest : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE(TestStorageClientTest); CPPUNIT_TEST(firstTest); + CPPUNIT_TEST(getAllPlaylistsTest); CPPUNIT_TEST(deletePlaylistTest); CPPUNIT_TEST_SUITE_END(); @@ -92,6 +93,14 @@ class TestStorageClientTest : public CPPUNIT_NS::TestFixture void deletePlaylistTest(void) throw (CPPUNIT_NS::Exception); + /** + * Testing getAllPlaylists(). + * + * @exception CPPUNIT_NS::Exception on test failures. + */ + void + getAllPlaylistsTest(void) + throw (CPPUNIT_NS::Exception); public: diff --git a/livesupport/products/scheduler/doc/model/SchedulerModel.zuml b/livesupport/products/scheduler/doc/model/SchedulerModel.zuml index 0c994d5d4..9d195b47c 100644 Binary files a/livesupport/products/scheduler/doc/model/SchedulerModel.zuml and b/livesupport/products/scheduler/doc/model/SchedulerModel.zuml differ diff --git a/livesupport/products/scheduler/etc/Makefile.in b/livesupport/products/scheduler/etc/Makefile.in index e48a4d1b4..1091ff71d 100644 --- a/livesupport/products/scheduler/etc/Makefile.in +++ b/livesupport/products/scheduler/etc/Makefile.in @@ -21,7 +21,7 @@ # # # Author : $Author: fgerlits $ -# Version : $Revision: 1.9 $ +# Version : $Revision: 1.10 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/etc/Makefile.in,v $ # # @configure_input@ @@ -118,7 +118,8 @@ SCHEDULER_OBJS = ${TMP_DIR}/SignalDispatcher.o \ ${TMP_DIR}/RescheduleMethod.o \ ${TMP_DIR}/ScheduleFactory.o \ ${TMP_DIR}/PostgresqlSchedule.o \ - ${TMP_DIR}/DeletePlaylistMethod.o + ${TMP_DIR}/DeletePlaylistMethod.o \ + ${TMP_DIR}/DisplayPlaylistsMethod.o SCHEDULER_EXE_OBJS = ${SCHEDULER_OBJS} \ ${TMP_DIR}/main.o @@ -140,6 +141,7 @@ TEST_RUNNER_OBJS = ${SCHEDULER_OBJS} \ ${TMP_DIR}/RescheduleMethodTest.o \ ${TMP_DIR}/PostgresqlScheduleTest.o \ ${TMP_DIR}/DeletePlaylistMethodTest.o \ + ${TMP_DIR}/DisplayPlaylistsMethodTest.o \ ${TMP_DIR}/TestRunner.o TEST_RUNNER_LIBS = ${SCHEDULER_EXE_LIBS} -lcppunit -ldl diff --git a/livesupport/products/scheduler/src/DisplayPlaylistsMethod.cxx b/livesupport/products/scheduler/src/DisplayPlaylistsMethod.cxx new file mode 100644 index 000000000..52d570353 --- /dev/null +++ b/livesupport/products/scheduler/src/DisplayPlaylistsMethod.cxx @@ -0,0 +1,125 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: fgerlits $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/DisplayPlaylistsMethod.cxx,v $ + +------------------------------------------------------------------------------*/ + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + + +#include + +#include "LiveSupport/Core/StorageClientInterface.h" +#include "LiveSupport/Storage/StorageClientFactory.h" +#include "DisplayPlaylistsMethod.h" + +using namespace boost; +using namespace boost::posix_time; + +using namespace LiveSupport; +using namespace LiveSupport::Core; +using namespace LiveSupport::Storage; + +using namespace LiveSupport::Scheduler; + +/* =================================================== local data structures */ + + +/* ================================================ local constants & macros */ + +/*------------------------------------------------------------------------------ + * The name of this XML-RPC method. + *----------------------------------------------------------------------------*/ +const std::string DisplayPlaylistsMethod::methodName = "displayPlaylists"; + + +/* =============================================== local function prototypes */ + + +/* ============================================================= module code */ + +/*------------------------------------------------------------------------------ + * Construct the method and register it right away. + *----------------------------------------------------------------------------*/ +DisplayPlaylistsMethod :: DisplayPlaylistsMethod ( + Ptr::Ref xmlRpcServer) throw() + : XmlRpc::XmlRpcServerMethod(methodName, xmlRpcServer.get()) +{ +} + + +/*------------------------------------------------------------------------------ + * Convert a vector of Playlists into an XML-RPC value. + * This function returns an XML-RPC array of XML-RPC structures. + *----------------------------------------------------------------------------*/ +void +DisplayPlaylistsMethod :: playlistVectorToXmlRpcValue( + const Ptr::Ref> >::Ref playlistVector, + XmlRpc::XmlRpcValue & returnValue) + throw () +{ + returnValue.setSize(playlistVector->size()); + // a call to setSize() makes sure it's an XML-RPC + // array + + std::vector::Ref>::const_iterator it = + playlistVector->begin(); + int arraySize = 0; + while (it != playlistVector->end()) { + Ptr::Ref playlist = *it; + XmlRpc::XmlRpcValue returnStruct; + returnStruct["id"] = (int) (playlist->getId()->getId()); + returnStruct["playlength"] = playlist->getPlaylength()->total_seconds(); + returnValue[arraySize++] = returnStruct; + ++it; + } +} + + +/*------------------------------------------------------------------------------ + * Execute the stop XML-RPC function call. + *----------------------------------------------------------------------------*/ +void +DisplayPlaylistsMethod :: execute(XmlRpc::XmlRpcValue & parameters, + XmlRpc::XmlRpcValue & returnValue) + throw () +{ + Ptr::Ref scf; + Ptr::Ref storage; + + scf = StorageClientFactory::getInstance(); + storage = scf->getStorageClient(); + + Ptr::Ref> >::Ref playlistVector = + storage->getAllPlaylists(); + + playlistVectorToXmlRpcValue(playlistVector, returnValue); +} + diff --git a/livesupport/products/scheduler/src/DisplayPlaylistsMethod.h b/livesupport/products/scheduler/src/DisplayPlaylistsMethod.h new file mode 100644 index 000000000..e38b8f468 --- /dev/null +++ b/livesupport/products/scheduler/src/DisplayPlaylistsMethod.h @@ -0,0 +1,151 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: fgerlits $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/DisplayPlaylistsMethod.h,v $ + +------------------------------------------------------------------------------*/ +#ifndef DisplayPlaylistsMethod_h +#define DisplayPlaylistsMethod_h + +#ifndef __cplusplus +#error This is a C++ include file +#endif + + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include +#include +#include +#include +#include + +#include "LiveSupport/Core/Ptr.h" +#include "LiveSupport/Core/Playlist.h" + + +namespace LiveSupport { +namespace Scheduler { + +using namespace boost::posix_time; + +using namespace LiveSupport; +using namespace LiveSupport::Core; + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * An XML-RPC method object to return a listing of the playlists contained + * in the playlist store. + * + * The name of the method when called through XML-RPC is "displayPlaylists". + * No input parameters are expected. + * + * The XML-RPC function returns an XML-RPC array, containing a structure + * for each playlist in the playlist store. An array of size 0 means the + * playlist store is empty. Each structure is as follows: + *
    + *
  • id - int - the unique id of the playlist
  • + *
  • playlength - int - the playlist length of the playlist, in seconds + *
  • + *
+ * In case of an error, a simple false value is returned. + * + * @author $Author: fgerlits $ + * @version $Revision: 1.1 $ + */ +class DisplayPlaylistsMethod : public XmlRpc::XmlRpcServerMethod +{ + private: + /** + * The name of this method, as it will be registered into the + * XML-RPC server. + */ + static const std::string methodName; + + /** + * Convert a vector of Playlists to an XML-RPC return value. + * + * @param playlistVector a list of Playlists. + * @param returnValue the output parameter holding an XML-RPC + * representation of the list of Playlists. + */ + void + playlistVectorToXmlRpcValue( + const Ptr::Ref> >::Ref playlistVector, + XmlRpc::XmlRpcValue & returnValue) + throw (); + + public: + /** + * A default constructor, for testing purposes. + */ + DisplayPlaylistsMethod(void) throw () + : XmlRpc::XmlRpcServerMethod(methodName) + { + } + + /** + * Constuctor that registers the method with the server right away. + * + * @param xmlRpcServer the XML-RPC server to register with. + */ + DisplayPlaylistsMethod( + Ptr::Ref xmlRpcServer) + throw (); + + /** + * Execute the displayPlaylists command on the Scheduler daemon. + * + * @param parameters XML-RPC function call parameters + * @param returnValue the return value of the call (out parameter) + */ + void + execute( XmlRpc::XmlRpcValue & parameters, + XmlRpc::XmlRpcValue & returnValue) throw (); +}; + + +/* ================================================= external data structures */ + + +/* ====================================================== function prototypes */ + + +} // namespace Scheduler +} // namespace LiveSupport + +#endif // DisplayPlaylistsMethod_h + diff --git a/livesupport/products/scheduler/src/DisplayPlaylistsMethodTest.cxx b/livesupport/products/scheduler/src/DisplayPlaylistsMethodTest.cxx new file mode 100644 index 000000000..15e5baa4f --- /dev/null +++ b/livesupport/products/scheduler/src/DisplayPlaylistsMethodTest.cxx @@ -0,0 +1,153 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: fgerlits $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/DisplayPlaylistsMethodTest.cxx,v $ + +------------------------------------------------------------------------------*/ + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#if HAVE_UNISTD_H +#include +#else +#error "Need unistd.h" +#endif + + +#include +#include +#include +#include + +#include "LiveSupport/Db/ConnectionManagerFactory.h" +#include "LiveSupport/Storage/StorageClientFactory.h" +#include "DisplayPlaylistsMethod.h" +#include "DisplayPlaylistsMethodTest.h" + + +using namespace LiveSupport::Db; +using namespace LiveSupport::Storage; +using namespace LiveSupport::Scheduler; + +/* =================================================== local data structures */ + + +/* ================================================ local constants & macros */ + +CPPUNIT_TEST_SUITE_REGISTRATION(DisplayPlaylistsMethodTest); + +/** + * The name of the configuration file for the storage client factory. + */ +const std::string DisplayPlaylistsMethodTest::storageClientConfig = + "etc/storageClient.xml"; + +/** + * The name of the configuration file for the connection manager factory. + */ +const std::string DisplayPlaylistsMethodTest::connectionManagerConfig = + "etc/connectionManagerFactory.xml"; + + +/* =============================================== local function prototypes */ + + +/* ============================================================= module code */ + +/*------------------------------------------------------------------------------ + * Configure a Configurable with an XML file. + *----------------------------------------------------------------------------*/ +void +DisplayPlaylistsMethodTest :: configure( + Ptr::Ref configurable, + const std::string fileName) + throw (std::invalid_argument, + xmlpp::exception) +{ + Ptr::Ref parser(new xmlpp::DomParser(fileName, true)); + const xmlpp::Document * document = parser->get_document(); + const xmlpp::Element * root = document->get_root_node(); + + configurable->configure(*root); +} + + +/*------------------------------------------------------------------------------ + * Set up the test environment + *----------------------------------------------------------------------------*/ +void +DisplayPlaylistsMethodTest :: setUp(void) throw () +{ + try { + Ptr::Ref scf + = StorageClientFactory::getInstance(); + configure(scf, storageClientConfig); + + Ptr::Ref cmf + = ConnectionManagerFactory::getInstance(); + configure(cmf, connectionManagerConfig); + + } catch (std::invalid_argument &e) { + CPPUNIT_FAIL("semantic error in configuration file"); + } catch (xmlpp::exception &e) { + CPPUNIT_FAIL("error parsing configuration file"); + } catch (std::exception &e) { + CPPUNIT_FAIL(e.what()); + } +} + + +/*------------------------------------------------------------------------------ + * Clean up the test environment + *----------------------------------------------------------------------------*/ +void +DisplayPlaylistsMethodTest :: tearDown(void) throw () +{ +} + + +/*------------------------------------------------------------------------------ + * Just a very simple smoke test + *----------------------------------------------------------------------------*/ +void +DisplayPlaylistsMethodTest :: firstTest(void) + throw (CPPUNIT_NS::Exception) +{ + Ptr::Ref method(new DisplayPlaylistsMethod()); + XmlRpc::XmlRpcValue parameters; + XmlRpc::XmlRpcValue result; + XmlRpc::XmlRpcValue playlist; + + method->execute(parameters, result); + CPPUNIT_ASSERT(result.size() == 1); + + playlist = result[0]; + CPPUNIT_ASSERT(((int) playlist["id"]) == 1); + CPPUNIT_ASSERT(((int) playlist["playlength"]) == (60 * 60)); +} diff --git a/livesupport/products/scheduler/src/DisplayPlaylistsMethodTest.h b/livesupport/products/scheduler/src/DisplayPlaylistsMethodTest.h new file mode 100644 index 000000000..947733ffd --- /dev/null +++ b/livesupport/products/scheduler/src/DisplayPlaylistsMethodTest.h @@ -0,0 +1,136 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: fgerlits $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/DisplayPlaylistsMethodTest.h,v $ + +------------------------------------------------------------------------------*/ +#ifndef DisplayPlaylistsMethodTest_h +#define DisplayPlaylistsMethodTest_h + +#ifndef __cplusplus +#error This is a C++ include file +#endif + + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include + + +namespace LiveSupport { +namespace Scheduler { + +using namespace LiveSupport; +using namespace LiveSupport::Core; + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * Unit test for the DisplayPlaylistsMethod class. + * + * @author $Author: fgerlits $ + * @version $Revision: 1.1 $ + * @see DisplayPlaylistsMethod + */ +class DisplayPlaylistsMethodTest : public CPPUNIT_NS::TestFixture +{ + CPPUNIT_TEST_SUITE(DisplayPlaylistsMethodTest); + CPPUNIT_TEST(firstTest); + CPPUNIT_TEST_SUITE_END(); + + /** + * The name of the configuration file for the storage client factory. + */ + static const std::string storageClientConfig; + + /** + * The name of the configuration file for the connection manager + * factory. + */ + static const std::string connectionManagerConfig; + + /** + * Configure a configurable with an XML file. + * + * @param configurable configure this + * @param fileName the name of the XML file to configure with. + * @exception std::invalid_argument on configuration errors. + * @exception xmlpp::exception on XML parsing errors. + */ + void + configure(Ptr::Ref configurable, + std::string fileName) + throw (std::invalid_argument, + xmlpp::exception); + + + protected: + + /** + * A simple test. + * + * @exception CPPUNIT_NS::Exception on test failures. + */ + void + firstTest(void) throw (CPPUNIT_NS::Exception); + + + public: + + /** + * Set up the environment for the test case. + */ + void + setUp(void) throw (); + + /** + * Clean up the environment after the test case. + */ + void + tearDown(void) throw (); +}; + + +/* ================================================= external data structures */ + + +/* ====================================================== function prototypes */ + + +} // namespace Scheduler +} // namespace LiveSupport + +#endif // DisplayPlaylistsMethodTest_h +