[gnote] Add test::SyncClient for use in tests



commit 457a9642db3f359a01363a3354f7f0559a496076
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Tue Aug 5 23:20:36 2014 +0300

    Add test::SyncClient for use in tests

 src/test/testsyncclient.cpp |   31 +++++++++++++++++++++++++
 src/test/testsyncclient.hpp |   52 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+), 0 deletions(-)
---
diff --git a/src/test/testsyncclient.cpp b/src/test/testsyncclient.cpp
new file mode 100644
index 0000000..6811852
--- /dev/null
+++ b/src/test/testsyncclient.cpp
@@ -0,0 +1,31 @@
+/*
+ * gnote
+ *
+ * Copyright (C) 2014 Aurimas Cernius
+ *
+ * This program 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include "testsyncclient.hpp"
+
+
+namespace test {
+
+SyncClient::SyncClient(gnote::NoteManagerBase & /*manager*/)
+{
+}
+
+}
+
diff --git a/src/test/testsyncclient.hpp b/src/test/testsyncclient.hpp
new file mode 100644
index 0000000..8308edf
--- /dev/null
+++ b/src/test/testsyncclient.hpp
@@ -0,0 +1,52 @@
+/*
+ * gnote
+ *
+ * Copyright (C) 2014 Aurimas Cernius
+ *
+ * This program 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _TEST_SYNCCLIENT_HPP_
+#define _TEST_SYNCCLIENT_HPP_
+
+#include "base/macros.hpp"
+#include "synchronization/gnotesyncclient.hpp"
+
+
+namespace test {
+
+class SyncClient
+  : public gnote::sync::GnoteSyncClient
+{
+public:
+  typedef shared_ptr<SyncClient> Ptr;
+
+  SyncClient(gnote::NoteManagerBase & manager);
+
+  void set_manifest_path(const std::string & path)
+  {
+    m_local_manifest_file_path = path;
+  }
+
+  void reparse()
+  {
+    parse(m_local_manifest_file_path);
+  }
+};
+
+}
+
+#endif
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]