Mike Frysinger | 3a446f2 | 2022-09-08 07:37:14 | [diff] [blame] | 1 | // Copyright 2020 The ChromiumOS Authors |
Wei-Cheng Xiao | af63512 | 2020-02-24 03:52:24 | [diff] [blame] | 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_TPM_CACHE_H_ |
| 6 | #define TRUNKS_MOCK_TPM_CACHE_H_ |
| 7 | |
Wei-Cheng Xiao | af63512 | 2020-02-24 03:52:24 | [diff] [blame] | 8 | #include <gmock/gmock.h> |
| 9 | |
| 10 | #include "trunks/tpm_cache.h" |
| 11 | #include "trunks/tpm_generated.h" |
| 12 | |
| 13 | namespace trunks { |
| 14 | |
| 15 | class MockTpmCache : public TpmCache { |
| 16 | public: |
| 17 | MockTpmCache(); |
Qijiang Fan | 6bc59e1 | 2020-11-10 17:51:06 | [diff] [blame] | 18 | MockTpmCache(const MockTpmCache&) = delete; |
| 19 | MockTpmCache& operator=(const MockTpmCache&) = delete; |
| 20 | |
Wei-Cheng Xiao | af63512 | 2020-02-24 03:52:24 | [diff] [blame] | 21 | ~MockTpmCache() override = default; |
| 22 | |
Tom Hughes | bba8004 | 2020-08-25 01:28:45 | [diff] [blame] | 23 | MOCK_METHOD(TPM_RC, |
| 24 | GetSaltingKeyPublicArea, |
| 25 | (TPMT_PUBLIC * public_area), |
| 26 | (override)); |
Wei-Cheng Xiao | ffc3b70 | 2020-02-27 09:10:17 | [diff] [blame] | 27 | MOCK_METHOD(TPM_ALG_ID, GetBestSupportedKeyType, (), (override)); |
Wei-Cheng Xiao | af63512 | 2020-02-24 03:52:24 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | } // namespace trunks |
| 31 | |
| 32 | #endif // TRUNKS_MOCK_TPM_CACHE_H_ |