#include "device/bluetooth/floss/floss_battery_manager_client.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "dbus/message.h"
#include "dbus/mock_bus.h"
#include "dbus/mock_exported_object.h"
#include "dbus/mock_object_proxy.h"
#include "device/bluetooth/floss/test_helpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
DoAll;
void FakeExportMethod(
const std::string& interface_name,
const std::string& method_name,
const dbus::ExportedObject::MethodCallCallback& method_call_callback,
dbus::ExportedObject::OnExportedCallback on_exported_callback) { … }
}
namespace floss {
const uint32_t kTestCallbackId = …;
class FlossBatteryManagerClientTest : public testing::Test,
public FlossBatteryManagerClientObserver { … };
TEST_F(FlossBatteryManagerClientTest, InitializesCorrectly) { … }
TEST_F(FlossBatteryManagerClientTest, ForwardsCallbacks) { … }
TEST_F(FlossBatteryManagerClientTest, ExportsDBusCorrectly) { … }
TEST_F(FlossBatteryManagerClientTest, GetBatteryInfo) { … }
}