Implementing Test Run Logic
In this section, you implement a SetValue method for the test Test Run.
To implement the Test Run logic:
Add the following method definition to the ITrackBarSrvReplay interface:
[ReplayInterface] public interface ITrackBarSrvReplay { void SetValue(int newValue); }
Add the following method implementation to the TrackBarSrv class in the Replay interface implementation region:
public void SetValue(int newValue) { System.Windows.Forms.TrackBar trackBar = (System.Windows.Forms.TrackBar)SourceControl; trackBar.Value = newValue; }
Build your project.
You can view the full source code of the final TrackBarSrv class implementation in Checking the TrackBarSrv.cs File.