/// <summary> /// Initializes the shared register. /// </summary> /// <param name="value">Initial value</param> /// <param name="runtime">this.Runtime</param> public MockSharedRegister(T value, TestingRuntime runtime) { this.Runtime = runtime; this.RegisterMachine = this.Runtime.CreateMachine(typeof(SharedRegisterMachine <T>)); this.Runtime.SendEvent(this.RegisterMachine, SharedRegisterEvent.SetEvent(value)); }
/// <summary> /// Sets current value of the register. /// </summary> /// <param name="value">Value</param> public void SetValue(T value) { this.Runtime.SendEvent(this.RegisterMachine, SharedRegisterEvent.SetEvent(value)); }
/// <summary> /// Initializes the shared register. /// </summary> /// <param name="value">Initial value</param> /// <param name="Runtime">Runtime</param> public MockSharedRegister(T value, BugFindingRuntime Runtime) { this.Runtime = Runtime; registerMachine = Runtime.CreateMachine(typeof(SharedRegisterMachine <T>)); Runtime.SendEvent(registerMachine, SharedRegisterEvent.SetEvent(value)); }