blob: 80ad47d5231281243f5734789d084feadd55023a [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.
#include "src/modular/lib/testing/module_facet_reader_fake.h"
#include "src/lib/fxl/logging.h"
namespace modular {
void ModuleFacetReaderFake::SetGetModuleManifestSink(
fit::function<void(const std::string&, GetModuleManifestCallback)> sink) {
sink_ = std::move(sink);
}
void ModuleFacetReaderFake::GetModuleManifest(const std::string& module_url,
GetModuleManifestCallback callback) {
if (sink_) {
sink_(module_url, std::move(callback));
} else {
callback({});
}
}
} // namespace modular