blob: 36964d53b6d1d3614d78d7b320ad7e92ae2d791f [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.
#ifndef MIST_MOCK_CONTEXT_H_
#define MIST_MOCK_CONTEXT_H_
#include <base/compiler_specific.h>
#include "mist/context.h"
namespace mist {
class MockConfigLoader;
class MockUdev;
// 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 {
public:
MockContext();
virtual ~MockContext() OVERRIDE;
// Initializes all helper objects with mocks in the context for unit testing.
// Always returns true.
virtual bool Initialize() OVERRIDE;
// Returns the MockConfigLoader object held by this context object.
MockConfigLoader* GetMockConfigLoader() const;
// Returns the MockUdev object held by this context object.
MockUdev* GetMockUdev() const;
private:
DISALLOW_COPY_AND_ASSIGN(MockContext);
};
} // namespace mist
#endif // MIST_MOCK_CONTEXT_H_