• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef TRUNKS_MOCK_AUTHORIZATION_DELEGATE_H_
6 #define TRUNKS_MOCK_AUTHORIZATION_DELEGATE_H_
7 
8 #include <string>
9 
10 #include <gmock/gmock.h>
11 
12 #include "authorization_delegate.h"
13 
14 namespace trunks {
15 
16 class MockAuthorizationDelegate : public AuthorizationDelegate {
17  public:
18   MockAuthorizationDelegate();
19   MockAuthorizationDelegate(const MockAuthorizationDelegate&) = delete;
20   MockAuthorizationDelegate& operator=(const MockAuthorizationDelegate&) =
21       delete;
22 
23   ~MockAuthorizationDelegate() override;
24 
25   MOCK_METHOD4(GetCommandAuthorization,
26                bool(const std::string&, bool, bool, std::string*));
27   MOCK_METHOD2(CheckResponseAuthorization,
28                bool(const std::string&, const std::string&));
29   MOCK_METHOD1(EncryptCommandParameter, bool(std::string*));
30   MOCK_METHOD1(DecryptResponseParameter, bool(std::string*));
31   MOCK_METHOD1(GetTpmNonce, bool(std::string*));
32 };
33 
34 }  // namespace trunks
35 
36 #endif  // TRUNKS_MOCK_AUTHORIZATION_DELEGATE_H_
37