blob: a3c4ab33176ebe6478eea00eeaf99bc9d8e4b8a9 [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/ledger/bin/tests/cloud_provider/validation_test.h"
#include "peridot/lib/base64url/base64url.h"
#include "peridot/lib/convert/convert.h"
namespace cloud_provider {
ValidationTest::ValidationTest()
: component_context_(sys::ComponentContext::Create()), random_(test_loop().initial_state()) {}
ValidationTest::~ValidationTest() = default;
std::vector<uint8_t> ValidationTest::GetUniqueRandomId() {
return convert::ToArray(base64url::Base64UrlEncode(random_.RandomUniqueBytes()));
}
void ValidationTest::SetUp() { component_context_->svc()->Connect(cloud_provider_.NewRequest()); }
} // namespace cloud_provider