Implementing Test Run Logic

In this section, you implement a SetValue method for the test Test Run.

To implement the Test Run logic:

  1. Add the following method definition to the ITrackBarSrvReplay interface:

    public interface ITrackBarSrvReplay
       void SetValue(int newValue);
  2. 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;
  3. Build your project.

You can view the full source code of the final TrackBarSrv class implementation in Checking the TrackBarSrv.cs File.