• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright (C) 2015 The Android Open Source Project
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 #ifndef ATTESTATION_COMMON_MOCK_ATTESTATION_INTERFACE_H_
18 #define ATTESTATION_COMMON_MOCK_ATTESTATION_INTERFACE_H_
19 
20 #include <string>
21 
22 #include <gmock/gmock.h>
23 
24 #include "attestation/common/attestation_interface.h"
25 
26 namespace attestation {
27 
28 class MockAttestationInterface : public AttestationInterface {
29  public:
30   MockAttestationInterface() = default;
31   virtual ~MockAttestationInterface() = default;
32 
33   MOCK_METHOD0(Initialize, bool());
34   MOCK_METHOD2(CreateGoogleAttestedKey,
35                void(const CreateGoogleAttestedKeyRequest&,
36                     const CreateGoogleAttestedKeyCallback&));
37   MOCK_METHOD2(GetKeyInfo,
38                void(const GetKeyInfoRequest&, const GetKeyInfoCallback&));
39   MOCK_METHOD2(GetEndorsementInfo,
40                void(const GetEndorsementInfoRequest&,
41                     const GetEndorsementInfoCallback&));
42   MOCK_METHOD2(GetAttestationKeyInfo,
43                void(const GetAttestationKeyInfoRequest&,
44                     const GetAttestationKeyInfoCallback&));
45   MOCK_METHOD2(ActivateAttestationKey,
46                void(const ActivateAttestationKeyRequest&,
47                     const ActivateAttestationKeyCallback&));
48   MOCK_METHOD2(CreateCertifiableKey,
49                void(const CreateCertifiableKeyRequest&,
50                     const CreateCertifiableKeyCallback&));
51   MOCK_METHOD2(Decrypt, void(const DecryptRequest&, const DecryptCallback&));
52   MOCK_METHOD2(Sign, void(const SignRequest&, const SignCallback&));
53   MOCK_METHOD2(RegisterKeyWithChapsToken,
54                void(const RegisterKeyWithChapsTokenRequest&,
55                     const RegisterKeyWithChapsTokenCallback&));
56 };
57 
58 }  // namespace attestation
59 
60 #endif  // ATTESTATION_COMMON_MOCK_ATTESTATION_INTERFACE_H_
61