blob: 77e4c9808bea532e7e7abb8ad0742e909944ef7a [file] [log] [blame]
// Copyright (c) 2013 The Chromium OS 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 "mist/context.h"
namespace brillo {
class MockUdev;
} // namespace brillo
namespace mist {
class MockConfigLoader;
// A mock context class, which replaces helper objects in the Context class with
// mocks and is used in place of the Context class in unit tests.
class MockContext : public Context {
MockContext() = default;
MockContext(const MockContext&) = delete;
MockContext& operator=(const MockContext&) = delete;
~MockContext() override = default;
// Initializes all helper objects with mocks in the context for unit testing.
// Always returns true.
bool Initialize() override;
// Returns the MockConfigLoader object held by this context object.
MockConfigLoader* GetMockConfigLoader() const;
// Returns the brillo::MockUdev object held by this context object.
brillo::MockUdev* GetMockUdev() const;
} // namespace mist