From the user's perspective, if the server application document is already open, the Edit verb will bring it to the top of the window stack. When the server application is a multi-instance application, a new instance will be started and the appropriate document opened. If the server is a single-instance application and is running, a new document will be opened in the current instance.
The server application interprets each verb. Every server application should support the Edit verb. Invoking this verb from a client application should cause either the server application to be started if it was not already running. If the server is running, it should be brought to the top of the window stack before opening the appropriate document.
11.4.2.1 Invoking Edit to Open an Embedded Object in the Server Application Test Case Svr-7
Precondition
The client application contains an embedded object that belongs to the server application.
Procedure
1.Invoke the Edit verb on the object in the client application.
2.Invoke the Edit verb again on the object in the client application.
Postcondition
If the server application is multi-instance, it should start the server application with the embedded object. The window title in the server application should display the name of the object provided by client application.
If the editor for the object is already open, double-clicking on the object in the client application should bring its editor to top. (The preceding Step 2 should not start another instance of the server application.)
If the server application is MDI application with several open documents, invoking Edit in the client application should bring the corresponding document to top.
The server application should not have the File Save option available, but instead should provide File Update, Choosing File Update should update the object in the client application. In the File menu, Save As should be changed to Save A Copy As... and Exit should be changed to Exit and Update.
Similar Test Cases
If your application accepts ColorPalette, use it with CLTEST.EXE to make sure that the server application gives a proper picture with different palettes (sometimes color combinations can make a picture invisible).
If your server application uses Printer Target Device, check that it gives proper picture information for different targets, and the screen picture if no target device is specified.
11.4.2.2 Invoking Edit to Open a Linked Object in the Server Application Test Case Svr-8
Precondition
A client application is running and has an open document with more than one linked object belonging to your server application.
Procedure
1.Invoke Edit on the linked object.
2.Invoke Edit again on the linked object whose editor is already open.
Postcondition
If the server application is multi-instance, it should start the server application with the document name. The window title in the server application should display the document name. If the server application is single-instance, a new document will be opened and no new instance will be started.
Any changes made to the document in the server application should be immediately visible in the client application, except when the client application created the linked object with OnCall Update. In this case, the change is not immediately visible.
Similar Test Case
If the server application is an SDI application, block or make busy the server application and try to invoke edit in the client application.
Special Cases
If the server application runs macros or displays a dialog box at start up time, check to see if the link is established. This check is required because if the server application is started from the client application, it should establish the link with the client application before yielding control.
Use an older client application such as Microsoft Excel 3.0x. It starts using the /Embedding command-line option instead of the -Embedding option.
11.4.2.3 Deleting and Cutting Objects to the Clipboard from the Client Application Test Case Cli-11
Precondition
A client application document containing embedded or linked objects.
Procedure
1.Select an object to copy to the clipboard.
2.Choose Edit Cut to delete the object from the client application document and copy it to the clipboard.
3.Open the clipboard to examine its contents.
Postcondition
Under the Display menu in the clipboard, Native and OwnerLink formats should appear if the object is embedded; ObjectLink format if the object is linked.
The copied object should be deleted from the client application document instance.
Any conversation with the server application should be broken. (The effect will be noticeable if the server application was open for editing an embedded object.)
Special Case
Try this test when the conversation is open and the server application is blocked.
Cut the object in the client application; since the object is not released, check the behavior of the client application. If the object is still visible, try to cut the object again.
Try to close the document.
Save the document and check the contents of the clipboard. In any of these tests, the client application should indicate an error.
11.4.2.4 Deleting and Cutting Objects to the Clipboard from the Server Application Test Case Svr-9
From the developer's perspective, an Edit Cut command from inside a server application should destroy the object. The server application should put Native and OwnerLink information on the clipboard. ObjectLink information should not be on the clipboard.
Precondition
The server application supports embedding of its objects.
Procedure
1.Create one or more objects in the server application.
2.Use the Edit Cut command to delete an object from the server application document and copy it to the clipboard.
3.Open the clipboard and examine its contents.
Postcondition
Under the Display menu in the clipboard, Native and OwnerLink formats should appear disabled.
ObjectLink format should not appear under the Display menu of the clipboard. Cutting the object would destroy it and make it unavailable for linking.
If the server application object is deleted while open for editing in the client application, the conversation between the applications should be broken.
11.4.2.5 Testing the Undo Command with Embedded Objects from a Client Application Test Case Cli-12
The Undo command is used to cancel an action in client applications. From the user's perspective, different applications will implement the Undo differently. Some client applications will allow the user to revert back to the changes made with the latest server application update. Other applications will allow the user to undo the deleted object.
From the developer's perspective, if the client application allows the rolling back of the latest changes, it will have to clone the object before starting the server application for editing. When the user selects Undo, the client application should destroy the original object and show the cloned object instead.
Precondition
An embedded object has been opened for editing.
Changes to the object have been made in the object's server application.
Procedure
1.Close the server application.
2.Return to the client application instance.
The object in the client application should have been updated to reflect the changes made in the editing session.
The Edit Undo command should be enabled in the client application.
3.Choose the Edit Undo command.
Postcondition
The embedded object should rollback to the state that existed before it was opened for editing.
Make sure the object properties have not changed. Check the object's properties; try to save the object, start the server application, and so on.
Special Cases
There is no recommended user interface for the Undo command, but if your application allows you to recreate the OLE object, check that the object name is preserved.
If the client application has an open link and the linked object is cut and then recreated using Undo, check that the client application automatically opens the link.