1 /* 2 * Copyright 2024 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 #pragma once 18 19 #include <gtest/gtest.h> 20 21 #include "test/common/mock_functions.h" 22 #include "test/fake/fake_osi.h" 23 24 class BtmWithFakesTest : public testing::Test { 25 protected: SetUp()26 void SetUp() override { fake_osi_ = std::make_unique<test::fake::FakeOsi>(); } 27 TearDown()28 void TearDown() override { fake_osi_.reset(); } 29 std::unique_ptr<test::fake::FakeOsi> fake_osi_; 30 }; 31 32 // Setup any default or optional mocks 33 class BtmWithMocksTest : public BtmWithFakesTest { 34 protected: SetUp()35 void SetUp() override { 36 BtmWithFakesTest::SetUp(); 37 reset_mock_function_count_map(); 38 } 39 TearDown()40 void TearDown() override { BtmWithFakesTest::TearDown(); } 41 }; 42