From the user's perspective, the server application should be selected and started with a new document. The user is able to edit and close the document. At closure, the server application prompts the user to update the object. If the user chooses to update, the updated object is inserted in the client application. If the user decides not to update the object, the client application should resume as though there were no new object.
From the developer's perspective, the client application should call SHELL.DLL functions to query the registration database for what types of objects are available on the workstation. The application gets the human-readable string from the registration database for each registered object type (class name) and displays a list box containing the objects. The client application examines the user selection and calls OleCreate with that class name to launch the server application.
11.3.5.1 Testing the Insert Object Command Test Case Cli-6
Precondition
The client application has implemented an Insert Object command.
Procedure
1.Choose the Insert Object command.
An Insert Object modal dialog box comes up containing a list box that allows the selection of the type of object to insert.
2.Select a type of object to insert.
The appropriate server application is started and loaded with a blank object.
3.In the server application, make changes to a blank object.
4.Choose File Update in the server application.
Postcondition
An object is embedded into the client application document.
The object's presentation depends on characteristics of the client application. In most cases, it will be Picture format. A client application can select different formats.
The size of the object depends on the size of the presentation created by the server application.
Similar Cases
Try the test when the server application is already running. Depending on whether the server application is multi-instance or single-instance, a new instance may or may not be started.
If the server is single-instance application that supports blocking, block (or make busy) the application and observe how the client application behaves when trying to manipulate the object or document. (Use SRTEST.EXE if necessary.)
11.3.5.2 Inserting an Embedded Object in a Client Application from a File Test Case Cli-7
Precondition
A client application allows creating an OLE object from the Insert Template command of CLTEST.EXE.
A server application has file extensions defined in the registration database.
Procedure
1.Use the Insert Object command to display the list box showing the list of server application editable files or the edit box to insert the file name.
The appropriate server application should be invoked and the server application should open the file for editing.
2.Edit the file in the server application and then close it.
Results
The edited object with all the changes should be inserted into the client application document.
Activating the object should start the server application with the object present. Note that this object now has no link to its parent file; changing the file does not change the embedded object.
Similar Test case
Try different files in different directories. Try cases where server application files and the server application are in different directories.
Special Case
Try this test with a server application that allows blocking. Block the application and check the status of an uncreated object.
11.3.5.3 Inserting a Link from a File Without Invoking its Editor - File is Closed Test Case Cli-8
Precondition
The client application supports the Insert Link From File command (part of CLTEST.EXE).
Procedure
Choose the Insert Link command and select the appropriate server application file name.
Postcondition
A link from the file should be inserted in the client application document without starting its server application.