1 /* 2 * Copyright 2019 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 "hci/le_advertising_manager.h" 19 20 #include <gmock/gmock.h> 21 22 // Unit test interfaces 23 namespace bluetooth { 24 namespace hci { 25 26 struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallback {}; 27 28 namespace testing { 29 30 using hci::AdvertiserId; 31 using hci::LeAdvertisingManager; 32 33 class MockLeAdvertisingManager : public LeAdvertisingManager { 34 public: 35 MOCK_METHOD(size_t, GetNumberOfAdvertisingInstances, (), (const)); 36 MOCK_METHOD( 37 AdvertiserId, 38 ExtendedCreateAdvertiser, 39 (int regId, 40 const ExtendedAdvertisingConfig, 41 const common::Callback<void(Address, AddressType)>&, 42 const common::Callback<void(ErrorCode, uint8_t, uint8_t)>&, 43 uint16_t, 44 uint8_t, 45 os::Handler*)); 46 MOCK_METHOD(void, RemoveAdvertiser, (AdvertiserId)); 47 48 }; 49 50 } // namespace testing 51 } // namespace hci 52 } // namespace bluetooth 53