blob: 25f2ff9df709e7dbfeb9703f6c72698b489874d7 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:typed_data';
import 'package:fidl/fidl.dart';
import 'package:fidl_fuchsia_ledger/fidl.dart' as ledger;
import 'fake_ledger_page.dart';
class _FakeProxyController<T> extends ProxyController<T> {
InterfaceRequest<T> request() {
return null;
/// Fake implementation of a PageSnapshot.
class FakeLedgerPageSnapshot extends ledger.PageSnapshotProxy {
FakeLedgerPage _fakeLedgerPage;
ProxyController<FakeLedgerPageSnapshot> get ctrl =>
void getEntries(
Uint8List keyPrefix,
ledger.Token token,
void callback(ledger.Status status, List<ledger.Entry> entriesResult,
ledger.Token nextTokenResult)) {
callback(ledger.Status.ok, _fakeLedgerPage.getEntries(keyPrefix), token);