From 673dfbb28627fea0836a71dc8cf8194428d9313b Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Fri, 24 Oct 2014 05:57:11 +0300 Subject: [PATCH] Added services moc. --- tests/testservices.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/testservices.h diff --git a/tests/testservices.h b/tests/testservices.h new file mode 100644 index 00000000..88e21769 --- /dev/null +++ b/tests/testservices.h @@ -0,0 +1,26 @@ +#ifndef __TEST_SERVICES__ +#define __TEST_SERVICES__ + +#include "stg/services.h" + +class TEST_SERVICES : public SERVICES +{ + public: + virtual int Add(const SERVICE_CONF & /*service*/, const ADMIN * /*admin*/) { return 0; } + virtual int Del(const std::string & /*name*/, const ADMIN * /*admin*/) { return 0; } + virtual int Change(const SERVICE_CONF & /*service*/, const ADMIN * /*admin*/) { return 0; } + virtual bool Find(const std::string & name, SERVICE_CONF * service) const { return false; } + virtual bool Find(const std::string & name, SERVICE_CONF_RES * service) const { return false; } + virtual bool Exists(const std::string & name) const { return false; } + virtual const std::string & GetStrError() const { return m_errorStr; } + virtual size_t Count() const { return 0; } + + virtual int OpenSearch() const { return 0; } + virtual int SearchNext(int, SERVICE_CONF * /*service*/) const { return 0; } + virtual int CloseSearch(int) const { return 0; } + + private: + std::string m_errorStr; +}; + +#endif -- 2.43.2