Complete set: Intro to C - Bill Buchanan
Complete set: Intro to C - Bill Buchanan
Complete set: Intro to C - Bill Buchanan
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
6.4 Tu<strong>to</strong>rial<br />
Starting with the AgilentTrainingFiles example complete the following tasks.<br />
1) Execute the program from the test environment.<br />
a) Observe the successful completion of the test sequence.<br />
b) Make a note of the three messages that show up in the Log tab. The final message<br />
should read “ending testpoint”<br />
2) Make a trivial change <strong>to</strong> the code:<br />
a) View the code of the TrainingTest.cs.<br />
b) Find the method UserRun and note that the two Trace lines give the same<br />
message.<br />
c) Change the second Trace line so that it produces “ending testpoint”.<br />
3) The powerMeter object is available within the TrainingTest.cs, include a call <strong>to</strong><br />
the re<strong>set</strong> method after the first trace statement. powerMeter.re<strong>set</strong>() should do the<br />
trick – notice the new line in the Log produced by this call.<br />
4) Create a new method in the power meter class.<br />
a) The method should be called blink<br />
b) It should write an appropriate message <strong>to</strong> the log using Trace.WriteLine.<br />
c) Observe the Log for the new test.<br />
5) Update the training sequence so that the test is run 3 times. You can do this by<br />
editing the file TrainingTest_DrivingData.csv repeat the final line (use a different<br />
name in the extra lines).<br />
<strong>Intro</strong>duction <strong>to</strong> .NET<br />
Agilent .NET Course: Module 6, page 6