Mir
mock_prompt_session_listener.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 2 or 3,
6  * as 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 General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored By: Nick Dedekind <nick.dedekind@canonical.com>
17  */
18 
19 #ifndef MIR_TEST_DOUBLES_MOCK_PROMPT_SESSION_LISTENER_H_
20 #define MIR_TEST_DOUBLES_MOCK_PROMPT_SESSION_LISTENER_H_
21 
22 #include "mir/scene/prompt_session_listener.h"
23 
24 #include <gmock/gmock.h>
25 
26 namespace mir
27 {
28 namespace test
29 {
30 namespace doubles
31 {
32 
33 struct MockPromptSessionListener : public scene::PromptSessionListener
34 {
35  virtual ~MockPromptSessionListener() noexcept(true) {}
36 
37  MOCK_METHOD1(starting, void(std::shared_ptr<scene::PromptSession> const&));
38  MOCK_METHOD1(stopping, void(std::shared_ptr<scene::PromptSession> const&));
39  MOCK_METHOD1(suspending, void(std::shared_ptr<scene::PromptSession> const&));
40  MOCK_METHOD1(resuming, void(std::shared_ptr<scene::PromptSession> const&));
41 
42  MOCK_METHOD2(prompt_provider_added, void(scene::PromptSession const&, std::shared_ptr<scene::Session> const&));
43  MOCK_METHOD2(prompt_provider_removed, void(scene::PromptSession const&, std::shared_ptr<scene::Session> const&));
44 };
45 
46 }
47 }
48 } // namespace mir
49 
50 #endif // MIR_TEST_DOUBLES_MOCK_PROMPT_SESSION_LISTENER_H_
AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: blob.h:26
virtual ~MockPromptSessionListener() noexcept(true)
Definition: mock_prompt_session_listener.h:35
MOCK_METHOD1(starting, void(std::shared_ptr< scene::PromptSession > const &))
MOCK_METHOD2(prompt_provider_added, void(scene::PromptSession const &, std::shared_ptr< scene::Session > const &))
Definition: mock_prompt_session_listener.h:33

Copyright © 2012-2018 Canonical Ltd.
Generated on Sun Jun 17 06:26:29 UTC 2018