1 // 2 // Copyright (c) 2010-2018 Antmicro 3 // 4 // This file is licensed under the MIT License. 5 // Full license text is available in 'licenses/MIT.txt'. 6 // 7 using System; 8 using Antmicro.Renode.Exceptions; 9 using Antmicro.Renode.Peripherals; 10 11 namespace Antmicro.Renode.UnitTests.Mocks 12 { 13 public class MockPeripheralWithDependency : IPeripheral 14 { MockPeripheralWithDependency(IPeripheral other = null, bool throwException = false)15 public MockPeripheralWithDependency(IPeripheral other = null, bool throwException = false) 16 { 17 if(throwException) 18 { 19 throw new ConstructionException("Fake exception"); 20 } 21 } 22 Reset()23 public void Reset() 24 { 25 26 } 27 } 28 } 29