Home | History | Annotate | Download | only in common
      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, void(
     35       const CreateGoogleAttestedKeyRequest&,
     36       const CreateGoogleAttestedKeyCallback&));
     37   MOCK_METHOD2(GetKeyInfo, void(const GetKeyInfoRequest&,
     38                                 const GetKeyInfoCallback&));
     39   MOCK_METHOD2(GetEndorsementInfo, void(const GetEndorsementInfoRequest&,
     40                                         const GetEndorsementInfoCallback&));
     41   MOCK_METHOD2(GetAttestationKeyInfo,
     42                void(const GetAttestationKeyInfoRequest&,
     43                     const GetAttestationKeyInfoCallback&));
     44   MOCK_METHOD2(ActivateAttestationKey,
     45                void(const ActivateAttestationKeyRequest&,
     46                     const ActivateAttestationKeyCallback&));
     47   MOCK_METHOD2(CreateCertifiableKey, void(const CreateCertifiableKeyRequest&,
     48                                           const CreateCertifiableKeyCallback&));
     49   MOCK_METHOD2(Decrypt, void(const DecryptRequest&, const DecryptCallback&));
     50   MOCK_METHOD2(Sign, void(const SignRequest&, const SignCallback&));
     51   MOCK_METHOD2(RegisterKeyWithChapsToken,
     52                void(const RegisterKeyWithChapsTokenRequest&,
     53                     const RegisterKeyWithChapsTokenCallback&));
     54 };
     55 
     56 }  // namespace attestation
     57 
     58 #endif  // ATTESTATION_COMMON_MOCK_ATTESTATION_INTERFACE_H_
     59 
     60