
|
Scenario 2 |
OO Testing Process in simulating functionalities of a VCR Scenario 2
Demonstration: VCR Component Beans (applets) Contains:
b) NavigatorEvent.java - provides Navigator events. c) NavigatorEventListener.java - generates NavigatorEventListener interface. d) NavigatorActionListener.java - is the interface used by application or applet. e) DrawNavigator.java - draws navigator bean panels on to the Bean & gets all mouse events f) Wadapt.java - window listener adapter class & implements windowClosing method g) NavigatorBeanInfo.java - provides extra information for the Bean user h) NavigatorCustomizer.java - customizer for NavigatorBean. Displays a text area & a text field where user can input a URL address Fig 14. Class diagram of Navigator class
Fig 15. Class diagram of DrawNavigator class
Fig 16. Class diagram of NavigatorEvent class
Fig 17. Class diagram of NavigatorActionListener & NavigatorEventListener interfaces
Fig 18. Class diagram of Navigator Customizer Class
Fig 19. Class diagram of Wadapt Class
Fig 20. Class diagram of NavigatorBeanInfo class
Fig 21. Collaboration diagram - Navigator Bean ProcessNavigationActionEvent method in Navigator Bean passes NavigatorEvent object as parameter. We want to highlight the communication between NavigatorEvent object and NavigatorActionListener object using state diagrams.
Fig 22. State diagram focussing on NavigatorClicked() Method in NavigatorEventListener Interface defined in Monitor Bean
Fig 23. State diagram focussing on MonitorEvent() method in Monitor Bean State Diagrams may send messages to other state diagrams. This is shown here with dashed arrows between the 2 state diagrams with MonitorEvent Object & MonitorActionListener object communication. There are 2 ways to show communication between state diagrams using dashed arrows. One way is to draw the dashed arrows from the transition within the source object, MonitorEvent to the border of the target object, MonitorActionListener. Then a transition is drawn within the target object, which corresponds to and catches the specified message. Another way is to draw a dashed line from the source to target, to show that the source object will send a message some time during its life, and the target object must have a corresponding transition to catch the message. |
Funded by Committee of University Teaching And Staff Development (CUTSD) through DEETYA, 1998