Creating stubs from the project explorer
You can create a stub from the project by simply selecting a source file or a function. Each stub simulates and replaces a particular function.
Procedure
To create a stub from the project explorer:
-
In the project explorer, right-click the project, source file, or a function, and click Stub Behavior.
If you select a function, skip to step 3.The Create Test Case wizard opens.
- On the Stubbed function page, enter the function name that you want to test in the Filter field. You can choose the functions displayed into the list.
- On the Stub Behavior page, type a
name for the stub behavior, an optional Description,
and click Next.The description contains information that can be viewed and edited in the test editor.
- On the Stub Location page, select a folder and a type a file name for the stub and click Finish.