1 /*
2  * Copyright 2022 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 #pragma once
17 
18 #include <gmock/gmock.h>
19 
20 #include <memory>
21 
22 #include "hci/address.h"
23 #include "hci/distance_measurement_manager.h"
24 
25 // Unit test interfaces
26 namespace bluetooth {
27 namespace hci {
28 
29 struct DistanceMeasurementManager::impl : public bluetooth::hci::LeAddressManagerCallback {};
30 
31 namespace testing {
32 
33 class MockDistanceMeasurementCallbacks : public DistanceMeasurementCallbacks {
34   MOCK_METHOD(void, OnDistanceMeasurementStarted, (Address, DistanceMeasurementMethod));
35   MOCK_METHOD(void, OnDistanceMeasurementStopped,
36               (Address, DistanceMeasurementErrorCode, DistanceMeasurementMethod));
37   MOCK_METHOD(void, OnDistanceMeasurementResult,
38               (Address, uint32_t, uint32_t, int, int, int, int, uint64_t, int8_t,
39                DistanceMeasurementMethod));
40 };
41 
42 class MockDistanceMeasurementManager : public DistanceMeasurementManager {
43 public:
44   MOCK_METHOD(void, RegisterDistanceMeasurementCallbacks, (DistanceMeasurementCallbacks*));
45   MOCK_METHOD(void, StartDistanceMeasurement,
46               (Address, uint16_t, uint16_t, DistanceMeasurementMethod));
47 };
48 
49 }  // namespace testing
50 }  // namespace hci
51 }  // namespace bluetooth
52