chromium/device/bluetooth/gatt_service_unittest.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "device/bluetooth/gatt_service.h"

#include "base/test/bind.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "device/bluetooth/public/cpp/bluetooth_uuid.h"
#include "device/bluetooth/test/fake_local_gatt_characteristic.h"
#include "device/bluetooth/test/fake_local_gatt_service.h"
#include "device/bluetooth/test/mock_bluetooth_adapter.h"
#include "device/bluetooth/test/mock_bluetooth_device.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {

const char kServiceId[] =;
const char kCharacteristicUuid[] =;
const char kTestDeviceName[] =;
const char kTestDeviceAddress[] =;
const std::vector<uint8_t> kReadCharacteristicValue =;
const int kReadCharacteristicOffset =;

std::unique_ptr<bluetooth::FakeLocalGattCharacteristic>
CreateFakeCharacteristic(device::BluetoothLocalGattService* service) {}

std::unique_ptr<testing::NiceMock<device::MockBluetoothDevice>>
CreateMockBluetoothDevice() {}

}  // namespace

namespace bluetooth {

class GattServiceTest : public testing::Test,
                        public mojom::GattServiceObserver {};

TEST_F(GattServiceTest, CreateGattServiceOnConstruction) {}

TEST_F(GattServiceTest, CreateCharacteristic_FailureIfGattServiceIsDestroyed) {}

TEST_F(GattServiceTest,
       CreateCharacteristic_FailureIfCreateGattCharacteristicFails) {}

TEST_F(GattServiceTest, CreateCharacteristic_SuccessIfCreated) {}

TEST_F(GattServiceTest,
       CreateCharacteristic_Success_MultiplePermissionsAndProperties) {}

TEST_F(GattServiceTest, OnReadCharacteristic_Success) {}

TEST_F(GattServiceTest, OnReadCharacteristic_Failure) {}

TEST_F(GattServiceTest, MojoDisconnect_GattServiceRemote) {}

TEST_F(GattServiceTest, MojoDisconnect_GattServiceObserverRemote) {}

TEST_F(GattServiceTest, Register_Success) {}

TEST_F(GattServiceTest, Register_Failure) {}

}  // namespace bluetooth