Test: bring aboard the LinkStatusAnalyzer mock required by HostStatusAnalyzer.
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Fri, 20 Jan 2012 10:15:53 +0000 (08:15 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Fri, 20 Jan 2012 10:15:53 +0000 (08:15 -0200)
test/mock_linkstatusanalyzer.cpp [new file with mode: 0644]
test/mock_linkstatusanalyzer.h [new file with mode: 0644]

diff --git a/test/mock_linkstatusanalyzer.cpp b/test/mock_linkstatusanalyzer.cpp
new file mode 100644 (file)
index 0000000..722733b
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
+
+#include "mock_linkstatusanalyzer.h"
+
+using namespace std;
+
+LinkStatusAnalyzer::LinkStatusAnalyzer()
+{
+}
+
+LinkStatusAnalyzer::~LinkStatusAnalyzer()
+{
+}
+
+void LinkStatusAnalyzer::notify_host_up( const string &host_address )
+{
+}
+
+void LinkStatusAnalyzer::notify_host_down( const string &host_address )
+{
+}
diff --git a/test/mock_linkstatusanalyzer.h b/test/mock_linkstatusanalyzer.h
new file mode 100644 (file)
index 0000000..d116b13
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
+
+#ifndef LINKSTATUSANALYZER_H
+#define LINKSTATUSANALYZER_H
+
+#include <string>
+
+#include <boost/shared_ptr.hpp>
+
+//-----------------------------------------------------------------------------
+// LinkStatusAnalyzer
+//-----------------------------------------------------------------------------
+
+/**
+ * @brief This is a fake link status class.
+ * Scope: one object for many hosts.
+ */
+class LinkStatusAnalyzer
+{
+public:
+    LinkStatusAnalyzer();
+    ~LinkStatusAnalyzer();
+
+    void notify_host_up( const std::string &host_address );
+    void notify_host_down( const std::string &host_address );
+
+};
+
+//-----------------------------------------------------------------------------
+// LinkStatusAnalyzerItem
+//-----------------------------------------------------------------------------
+
+typedef boost::shared_ptr<LinkStatusAnalyzer> LinkStatusAnalyzerItem;
+
+#endif // LINKSTATUSANALYZER_H