blob: 6d3b926854ee2c608df8f50ff32c691d97056e3a [file] [log] [blame]
Alex Deymo42432912013-07-12 20:21:15 -07001// Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_FAKE_HARDWARE_H__
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_FAKE_HARDWARE_H__
7
8#include "update_engine/hardware_interface.h"
9
Alex Deymo42432912013-07-12 20:21:15 -070010namespace chromeos_update_engine {
11
12// Implements a fake hardware interface used for testing.
13class FakeHardware : public HardwareInterface {
14 public:
J. Richard Barnette4da2cc12013-10-28 16:11:10 -070015 FakeHardware()
16 : boot_device_("/dev/sdz5") {}
Alex Deymo42432912013-07-12 20:21:15 -070017
18 // HardwareInterface methods.
19 virtual const std::string BootDevice() { return boot_device_; }
Alex Deymo42432912013-07-12 20:21:15 -070020
21 // Setters
22 void SetBootDevice(const std::string boot_device) {
23 boot_device_ = boot_device;
24 }
Alex Deymo42432912013-07-12 20:21:15 -070025
26 private:
27 std::string boot_device_;
Alex Deymo42432912013-07-12 20:21:15 -070028
29 DISALLOW_COPY_AND_ASSIGN(FakeHardware);
30};
31
32} // namespace chromeos_update_engine
33
34#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_FAKE_HARDWARE_H__