■
Note
One limitation of the OTB is that it has no ability to handle incoming events sent from a given object.
If you need to test the incoming events, you will be required to build a separate assembly to do so.
To work with OTB, right-click the type you wish to create using the Class Designer. For example,
right-click the SportsCar type, and from the resulting context menu select Create Instance ➤
SportsCar(). This will display a dialog box that allows you to name your temporary object variable
(and supply any constructor arguments if required). Once the process is complete, you will find
your object hosted within the IDE. Right-click the object icon and invoke the GetPetName() method
(see Figure 2-30).
Figure 2-30.
The Visual Studio 2008 Object Test Bench
Once you do, you will see the value Fred displayed in the Method Call Result dialog box. In fact,
if you wish, you can save this value as a new object (of type System.String) on the OTB.
Do'stlaringiz bilan baham: |