Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MockSearchReply.h
1 /*
2  * Copyright (C) 2013 Canonical Ltd
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Thomas Voß <thomas.voss@canonical.com>
17  */
18 
19 #ifndef UNITY_SCOPES_TESTING_MOCK_SEARCHREPLY_H
20 #define UNITY_SCOPES_TESTING_MOCK_SEARCHREPLY_H
21 
22 #include <unity/scopes/CategorisedResult.h>
23 #include <unity/scopes/SearchReply.h>
24 
25 #include <unity/scopes/testing/MockObject.h>
26 
27 #include <gmock/gmock.h>
28 
29 namespace unity
30 {
31 
32 namespace scopes
33 {
34 
35 namespace testing
36 {
37 
39 
40 class MockSearchReply : public unity::scopes::SearchReply, public virtual MockObject
41 {
42 public:
43  MockSearchReply() = default;
44 
45  // From Reply
46  MOCK_METHOD0(finished, void());
47  MOCK_METHOD1(error, void(std::exception_ptr));
48 
49  // From SearchReply
50  MOCK_METHOD2(register_departments, void(DepartmentList const&, std::string ));
51  MOCK_METHOD4(register_category,
52  Category::SCPtr(std::string const&,
53  std::string const&,
54  std::string const&,
55  CategoryRenderer const&));
56  MOCK_METHOD1(register_category, void(Category::SCPtr category));
57  MOCK_METHOD1(lookup_category, Category::SCPtr(std::string const&));
58  MOCK_METHOD1(push, bool(CategorisedResult const&));
59  MOCK_METHOD2(push, bool(Filters const&, FilterState const&));
60  MOCK_METHOD1(register_annotation, bool(Annotation const& annotation));
61 };
62 
64 
65 } // namespace testing
66 
67 } // namespace scopes
68 
69 } // namespace unity
70 
71 #endif
std::list< FilterBase::SCPtr > Filters
List of filters.
Definition: FilterBase.h:83
std::list< Department > DepartmentList
List of departments (see unity::scopes::Department)
Definition: Department.h:40
Allows the results of a search query to be sent to the query source.
Definition: SearchReply.h:42