diff --git a/livesupport/modules/authentication/etc/Makefile.in b/livesupport/modules/authentication/etc/Makefile.in index 631edae74..1958329b4 100644 --- a/livesupport/modules/authentication/etc/Makefile.in +++ b/livesupport/modules/authentication/etc/Makefile.in @@ -21,7 +21,7 @@ # # # Author : $Author: fgerlits $ -# Version : $Revision: 1.4 $ +# Version : $Revision: 1.5 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/etc/Makefile.in,v $ # # @configure_input@ @@ -99,9 +99,10 @@ AUTHENTICATION_LIB_OBJS = ${TMP_DIR}/AuthenticationClientFactory.o \ ${TMP_DIR}/TestAuthenticationClient.o \ ${TMP_DIR}/WebAuthenticationClient.o -TEST_RUNNER_OBJS = ${TMP_DIR}/WebAuthenticationClientTest.o \ +TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \ ${TMP_DIR}/TestAuthenticationClientTest.o \ - ${TMP_DIR}/TestRunner.o + ${TMP_DIR}/WebAuthenticationClientTest.o \ + ${TMP_DIR}/AuthenticationClientFactoryTest.o TEST_RUNNER_LIBS = -l${AUTHENTICATION_LIB} -l${CORE_LIB} -lxml++-1.0 \ -lcppunit -ldl -lxmlrpc++ -lssl diff --git a/livesupport/modules/authentication/include/LiveSupport/Authentication/AuthenticationClientFactory.h b/livesupport/modules/authentication/include/LiveSupport/Authentication/AuthenticationClientFactory.h index 0785c89ea..57cc517a8 100644 --- a/livesupport/modules/authentication/include/LiveSupport/Authentication/AuthenticationClientFactory.h +++ b/livesupport/modules/authentication/include/LiveSupport/Authentication/AuthenticationClientFactory.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.4 $ + Version : $Revision: 1.5 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/include/LiveSupport/Authentication/AuthenticationClientFactory.h,v $ ------------------------------------------------------------------------------*/ @@ -43,7 +43,7 @@ #include #include "LiveSupport/Core/Configurable.h" -#include "LiveSupport/Core/AuthenticationClientInterface.h" +#include "LiveSupport/Authentication/AuthenticationClientInterface.h" namespace LiveSupport { @@ -93,7 +93,7 @@ using namespace LiveSupport::Core; * * * @author $Author: fgerlits $ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * @see TestAuthenticationClient * @see WebAuthenticationClient */ diff --git a/livesupport/modules/core/include/LiveSupport/Core/AuthenticationClientInterface.h b/livesupport/modules/authentication/include/LiveSupport/Authentication/AuthenticationClientInterface.h similarity index 87% rename from livesupport/modules/core/include/LiveSupport/Core/AuthenticationClientInterface.h rename to livesupport/modules/authentication/include/LiveSupport/Authentication/AuthenticationClientInterface.h index 046691925..ebce1550c 100644 --- a/livesupport/modules/core/include/LiveSupport/Core/AuthenticationClientInterface.h +++ b/livesupport/modules/authentication/include/LiveSupport/Authentication/AuthenticationClientInterface.h @@ -22,12 +22,12 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.1 $ - Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/Attic/AuthenticationClientInterface.h,v $ + Version : $Revision: 1.3 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/include/LiveSupport/Authentication/AuthenticationClientInterface.h,v $ ------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_AuthenticationClientInterface_h -#define LiveSupport_Core_AuthenticationClientInterface_h +#ifndef LiveSupport_Authentication_AuthenticationClientInterface_h +#define LiveSupport_Authentication_AuthenticationClientInterface_h #ifndef __cplusplus #error This is a C++ include file @@ -46,7 +46,7 @@ #include "LiveSupport/Core/SessionId.h" namespace LiveSupport { -namespace Core { +namespace Authentication { using namespace LiveSupport::Core; @@ -63,7 +63,7 @@ using namespace LiveSupport::Core; * An interface for authentication clients. * * @author $Author: fgerlits $ - * @version $Revision: 1.1 $ + * @version $Revision: 1.3 $ */ class AuthenticationClientInterface { @@ -101,8 +101,8 @@ class AuthenticationClientInterface /* ====================================================== function prototypes */ -} // namespace Core +} // namespace Authentication } // namespace LiveSupport -#endif // LiveSupport_Core_AuthenticationClientInterface_h +#endif // LiveSupport_Authentication_AuthenticationClientInterface_h diff --git a/livesupport/modules/authentication/src/AuthenticationClientFactoryTest.cxx b/livesupport/modules/authentication/src/AuthenticationClientFactoryTest.cxx new file mode 100644 index 000000000..945cb0d79 --- /dev/null +++ b/livesupport/modules/authentication/src/AuthenticationClientFactoryTest.cxx @@ -0,0 +1,123 @@ +/*------------------------------------------------------------------------------ + + 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/modules/authentication/src/AuthenticationClientFactoryTest.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 "LiveSupport/Core/SessionId.h" +#include "AuthenticationClientFactoryTest.h" + + +using namespace std; +using namespace LiveSupport::Core; +using namespace LiveSupport::Authentication; + +/* =================================================== local data structures */ + + +/* ================================================ local constants & macros */ + +CPPUNIT_TEST_SUITE_REGISTRATION(AuthenticationClientFactoryTest); + +/** + * The name of the configuration file for the authentication client factory. + */ +static const std::string configFileName = "etc/authenticationClient.xml"; + + +/* =============================================== local function prototypes */ + + +/* ============================================================= module code */ + +/*------------------------------------------------------------------------------ + * Set up the test environment + *----------------------------------------------------------------------------*/ +void +AuthenticationClientFactoryTest :: setUp(void) throw () +{ + Ptr::Ref + acf = AuthenticationClientFactory::getInstance(); + try { + Ptr::Ref parser( + new xmlpp::DomParser(configFileName, true)); + const xmlpp::Document * document = parser->get_document(); + const xmlpp::Element * root = document->get_root_node(); + + acf->configure(*root); + } catch (std::invalid_argument &e) { + CPPUNIT_FAIL("semantic error in configuration file"); + } catch (xmlpp::exception &e) { + CPPUNIT_FAIL("error parsing configuration file"); + } +} + + +/*------------------------------------------------------------------------------ + * Clean up the test environment + *----------------------------------------------------------------------------*/ +void +AuthenticationClientFactoryTest :: tearDown(void) throw () +{ +} + + +/*------------------------------------------------------------------------------ + * Test to see if we can log on and off + *----------------------------------------------------------------------------*/ +void +AuthenticationClientFactoryTest :: firstTest(void) + throw (CPPUNIT_NS::Exception) +{ + Ptr::Ref + acf = AuthenticationClientFactory::getInstance(); + Ptr::Ref + authentication = acf->getAuthenticationClient(); + + Ptr::Ref sessionId; + + sessionId = authentication->login("root", "q"); + CPPUNIT_ASSERT(sessionId); + CPPUNIT_ASSERT(authentication->logout(sessionId)); +} + diff --git a/livesupport/modules/authentication/src/AuthenticationClientFactoryTest.h b/livesupport/modules/authentication/src/AuthenticationClientFactoryTest.h new file mode 100644 index 000000000..48dcd4cf7 --- /dev/null +++ b/livesupport/modules/authentication/src/AuthenticationClientFactoryTest.h @@ -0,0 +1,109 @@ +/*------------------------------------------------------------------------------ + + 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/modules/authentication/src/AuthenticationClientFactoryTest.h,v $ + +------------------------------------------------------------------------------*/ +#ifndef AuthenticationClientFactoryTest_h +#define AuthenticationClientFactoryTest_h + +#ifndef __cplusplus +#error This is a C++ include file +#endif + + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include + +#include "LiveSupport/Authentication/AuthenticationClientFactory.h" + +namespace LiveSupport { +namespace Authentication { + +using namespace LiveSupport::Core; + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * Unit test for the AuthenticationClientFactory class. + * + * @author $Author: fgerlits $ + * @version $Revision: 1.1 $ + * @see AuthenticationClientFactory + */ +class AuthenticationClientFactoryTest : public CPPUNIT_NS::TestFixture +{ + CPPUNIT_TEST_SUITE(AuthenticationClientFactoryTest); + CPPUNIT_TEST(firstTest); + CPPUNIT_TEST_SUITE_END(); + + 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 Authentication +} // namespace LiveSupport + +#endif // AuthenticationClientFactoryTest_h + diff --git a/livesupport/modules/authentication/src/TestAuthenticationClient.h b/livesupport/modules/authentication/src/TestAuthenticationClient.h index 5c5b9d73c..becac1aab 100644 --- a/livesupport/modules/authentication/src/TestAuthenticationClient.h +++ b/livesupport/modules/authentication/src/TestAuthenticationClient.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.4 $ + Version : $Revision: 1.5 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/TestAuthenticationClient.h,v $ ------------------------------------------------------------------------------*/ @@ -47,7 +47,7 @@ #include "LiveSupport/Core/Ptr.h" #include "LiveSupport/Core/Configurable.h" #include "LiveSupport/Core/SessionId.h" -#include "LiveSupport/Core/AuthenticationClientInterface.h" +#include "LiveSupport/Authentication/AuthenticationClientInterface.h" namespace LiveSupport { @@ -92,7 +92,7 @@ using namespace LiveSupport::Core; * * * @author $Author: fgerlits $ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ class TestAuthenticationClient : virtual public Configurable, diff --git a/livesupport/modules/authentication/src/WebAuthenticationClient.h b/livesupport/modules/authentication/src/WebAuthenticationClient.h index 483d44a44..a802456f5 100644 --- a/livesupport/modules/authentication/src/WebAuthenticationClient.h +++ b/livesupport/modules/authentication/src/WebAuthenticationClient.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/WebAuthenticationClient.h,v $ ------------------------------------------------------------------------------*/ @@ -45,7 +45,7 @@ #include "LiveSupport/Core/Ptr.h" #include "LiveSupport/Core/Configurable.h" #include "LiveSupport/Core/SessionId.h" -#include "LiveSupport/Core/AuthenticationClientInterface.h" +#include "LiveSupport/Authentication/AuthenticationClientInterface.h" namespace LiveSupport { @@ -93,7 +93,7 @@ using namespace LiveSupport::Core; * * * @author $Author: fgerlits $ - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ */ class WebAuthenticationClient : virtual public Configurable, diff --git a/livesupport/modules/storage/etc/Makefile.in b/livesupport/modules/storage/etc/Makefile.in index ec7797602..2dec78d51 100644 --- a/livesupport/modules/storage/etc/Makefile.in +++ b/livesupport/modules/storage/etc/Makefile.in @@ -20,8 +20,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # -# Author : $Author: maroy $ -# Version : $Revision: 1.8 $ +# Author : $Author: fgerlits $ +# Version : $Revision: 1.9 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/etc/Makefile.in,v $ # # @configure_input@ @@ -106,9 +106,10 @@ STORAGE_LIB_OBJS = ${TMP_DIR}/StorageClientFactory.o \ ${TMP_DIR}/TestStorageClient.o \ ${TMP_DIR}/WebStorageClient.o -TEST_RUNNER_OBJS = ${TMP_DIR}/TestStorageClientTest.o \ - ${TMP_DIR}/WebStorageClientTest.o \ - ${TMP_DIR}/TestRunner.o +TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \ + ${TMP_DIR}/StorageClientFactoryTest.o \ + ${TMP_DIR}/TestStorageClientTest.o \ + ${TMP_DIR}/WebStorageClientTest.o TEST_RUNNER_LIBS = -l${STORAGE_LIB} -l${CORE_LIB} -l${AUTHENTICATION_LIB} \ -lxml++-1.0 -lcppunit -ldl -lxmlrpc++ -lssl diff --git a/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientFactory.h b/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientFactory.h index 07adc89f8..615d7ee45 100644 --- a/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientFactory.h +++ b/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientFactory.h @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.5 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.6 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientFactory.h,v $ ------------------------------------------------------------------------------*/ @@ -43,7 +43,7 @@ #include #include "LiveSupport/Core/Configurable.h" -#include "LiveSupport/Core/StorageClientInterface.h" +#include "LiveSupport/Storage/StorageClientInterface.h" namespace LiveSupport { @@ -98,8 +98,8 @@ using namespace LiveSupport::Core; * * * - * @author $Author: maroy $ - * @version $Revision: 1.5 $ + * @author $Author: fgerlits $ + * @version $Revision: 1.6 $ * @see TestStorageClient * @see WebStorageClient */ diff --git a/livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h b/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h similarity index 97% rename from livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h rename to livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h index 4c1ecd02a..8df3fd24f 100644 --- a/livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h +++ b/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h @@ -22,12 +22,12 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.16 $ - Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/Attic/StorageClientInterface.h,v $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h,v $ ------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_StorageClientInterface_h -#define LiveSupport_Core_StorageClientInterface_h +#ifndef LiveSupport_Storage_StorageClientInterface_h +#define LiveSupport_Storage_StorageClientInterface_h #ifndef __cplusplus #error This is a C++ include file @@ -48,7 +48,9 @@ namespace LiveSupport { -namespace Core { +namespace Storage { + +using namespace Core; /* ================================================================ constants */ @@ -62,7 +64,7 @@ namespace Core { * An interface for storage clients. * * @author $Author: fgerlits $ - * @version $Revision: 1.16 $ + * @version $Revision: 1.1 $ */ class StorageClientInterface { @@ -299,8 +301,8 @@ class StorageClientInterface /* ====================================================== function prototypes */ -} // namespace Core +} // namespace Storage } // namespace LiveSupport -#endif // LiveSupport_Core_StorageClientInterface_h +#endif // LiveSupport_Storage_StorageClientInterface_h diff --git a/livesupport/modules/storage/src/StorageClientFactoryTest.cxx b/livesupport/modules/storage/src/StorageClientFactoryTest.cxx new file mode 100644 index 000000000..dc4935b0b --- /dev/null +++ b/livesupport/modules/storage/src/StorageClientFactoryTest.cxx @@ -0,0 +1,158 @@ +/*------------------------------------------------------------------------------ + + 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/modules/storage/src/StorageClientFactoryTest.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 "LiveSupport/Authentication/AuthenticationClientFactory.h" +#include "LiveSupport/Authentication/AuthenticationClientInterface.h" +#include "LiveSupport/Storage/StorageClientFactory.h" +#include "LiveSupport/Storage/StorageClientInterface.h" +#include "StorageClientFactoryTest.h" + + +using namespace std; +using namespace LiveSupport::Core; +using namespace LiveSupport::Authentication; +using namespace LiveSupport::Storage; + +/* =================================================== local data structures */ + + +/* ================================================ local constants & macros */ + +CPPUNIT_TEST_SUITE_REGISTRATION(StorageClientFactoryTest); + +/** + * The name of the configuration file for the storage client factory. + */ +static const std::string storageConfig = "etc/storageClient.xml"; + +/** + * The name of the configuration file for the authentication client factory. + */ +static const std::string authenticationConfig = "etc/authenticationClient.xml"; + + +/* =============================================== local function prototypes */ + + +/* ============================================================= module code */ + +/*------------------------------------------------------------------------------ + * Set up the test environment + *----------------------------------------------------------------------------*/ +void +StorageClientFactoryTest :: setUp(void) throw () +{ + Ptr::Ref + acf = AuthenticationClientFactory::getInstance(); + try { + Ptr::Ref parser( + new xmlpp::DomParser(authenticationConfig, true)); + const xmlpp::Document * document = parser->get_document(); + const xmlpp::Element * root = document->get_root_node(); + + acf->configure(*root); + } catch (std::invalid_argument &e) { + CPPUNIT_FAIL("semantic error in authentication configuration file"); + } catch (xmlpp::exception &e) { + CPPUNIT_FAIL("error parsing authentication configuration file"); + } + + Ptr::Ref + scf = StorageClientFactory::getInstance(); + try { + Ptr::Ref parser( + new xmlpp::DomParser(storageConfig, true)); + const xmlpp::Document * document = parser->get_document(); + const xmlpp::Element * root = document->get_root_node(); + + scf->configure(*root); + } catch (std::invalid_argument &e) { + CPPUNIT_FAIL("semantic error in storage configuration file"); + } catch (xmlpp::exception &e) { + CPPUNIT_FAIL("error parsing storage configuration file"); + } +} + + +/*------------------------------------------------------------------------------ + * Clean up the test environment + *----------------------------------------------------------------------------*/ +void +StorageClientFactoryTest :: tearDown(void) throw () +{ +} + + +/*------------------------------------------------------------------------------ + * Test to see if we can do some simple operations + *----------------------------------------------------------------------------*/ +void +StorageClientFactoryTest :: firstTest(void) + throw (CPPUNIT_NS::Exception) +{ + Ptr::Ref + scf = StorageClientFactory::getInstance(); + Ptr::Ref + storage = scf->getStorageClient(); + + Ptr::Ref + acf = AuthenticationClientFactory::getInstance(); + Ptr::Ref + authentication = acf->getAuthenticationClient(); + Ptr::Ref + sessionId = authentication->login("root", "q"); + CPPUNIT_ASSERT(sessionId); + + Ptr::Ref id01(new UniqueId(1)); + Ptr::Ref id77(new UniqueId(77)); + + CPPUNIT_ASSERT( storage->existsPlaylist(sessionId, id01)); + CPPUNIT_ASSERT(!storage->existsPlaylist(sessionId, id77)); + + Ptr::Ref playlist = storage->getPlaylist(sessionId, id01); + CPPUNIT_ASSERT(playlist->getId()->getId() == id01->getId()); +} + diff --git a/livesupport/modules/storage/src/StorageClientFactoryTest.h b/livesupport/modules/storage/src/StorageClientFactoryTest.h new file mode 100644 index 000000000..2ff30ed05 --- /dev/null +++ b/livesupport/modules/storage/src/StorageClientFactoryTest.h @@ -0,0 +1,107 @@ +/*------------------------------------------------------------------------------ + + 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/modules/storage/src/StorageClientFactoryTest.h,v $ + +------------------------------------------------------------------------------*/ +#ifndef StorageClientFactoryTest_h +#define StorageClientFactoryTest_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 Storage { + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * Unit test for the StorageClientFactory class. + * + * @author $Author: fgerlits $ + * @version $Revision: 1.1 $ + * @see StorageClientFactory + */ +class StorageClientFactoryTest : public CPPUNIT_NS::TestFixture +{ + CPPUNIT_TEST_SUITE(StorageClientFactoryTest); + CPPUNIT_TEST(firstTest); + CPPUNIT_TEST_SUITE_END(); + + 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 Storage +} // namespace LiveSupport + +#endif // StorageClientFactoryTest_h + diff --git a/livesupport/modules/storage/src/TestStorageClient.h b/livesupport/modules/storage/src/TestStorageClient.h index f5518de15..2e64c30c2 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.18 $ + Version : $Revision: 1.19 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $ ------------------------------------------------------------------------------*/ @@ -46,8 +46,8 @@ #include "LiveSupport/Core/UniqueId.h" #include "LiveSupport/Core/Playlist.h" #include "LiveSupport/Core/Configurable.h" -#include "LiveSupport/Core/StorageClientInterface.h" #include "LiveSupport/Core/SessionId.h" +#include "LiveSupport/Storage/StorageClientInterface.h" namespace LiveSupport { @@ -90,7 +90,7 @@ using namespace LiveSupport::Core; * * * @author $Author: fgerlits $ - * @version $Revision: 1.18 $ + * @version $Revision: 1.19 $ */ class TestStorageClient : virtual public Configurable, diff --git a/livesupport/modules/storage/src/WebStorageClient.h b/livesupport/modules/storage/src/WebStorageClient.h index fbd483e46..e666fe559 100644 --- a/livesupport/modules/storage/src/WebStorageClient.h +++ b/livesupport/modules/storage/src/WebStorageClient.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.7 $ + Version : $Revision: 1.8 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.h,v $ ------------------------------------------------------------------------------*/ @@ -46,8 +46,8 @@ #include "LiveSupport/Core/UniqueId.h" #include "LiveSupport/Core/Playlist.h" #include "LiveSupport/Core/Configurable.h" -#include "LiveSupport/Core/StorageClientInterface.h" #include "LiveSupport/Core/SessionId.h" +#include "LiveSupport/Storage/StorageClientInterface.h" namespace LiveSupport { @@ -99,7 +99,7 @@ using namespace LiveSupport::Core; * * * @author $Author: fgerlits $ - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ */ class WebStorageClient : virtual public Configurable, diff --git a/livesupport/modules/storage/src/WebStorageClientTest.h b/livesupport/modules/storage/src/WebStorageClientTest.h index ec3d9ff5c..71918b0ca 100644 --- a/livesupport/modules/storage/src/WebStorageClientTest.h +++ b/livesupport/modules/storage/src/WebStorageClientTest.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.3 $ + Version : $Revision: 1.4 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClientTest.h,v $ ------------------------------------------------------------------------------*/ @@ -42,13 +42,14 @@ #include -#include "LiveSupport/Core/AuthenticationClientInterface.h" +#include "LiveSupport/Authentication/AuthenticationClientInterface.h" #include "LiveSupport/Authentication/AuthenticationClientFactory.h" namespace LiveSupport { namespace Storage { using namespace LiveSupport::Core; +using namespace LiveSupport::Authentication; /* ================================================================ constants */ @@ -62,7 +63,7 @@ using namespace LiveSupport::Core; * Unit test for the UploadPlaylistMetohd class. * * @author $Author: fgerlits $ - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ * @see WebStorageClient */ class WebStorageClientTest : public CPPUNIT_NS::TestFixture