To test the AddressBook Class, we will create a simple Test Activity that puts an entry into an AddressBook and then gets it back again.


To create a Test Activity


  1. Right click on the root Model in the Model Browser, select Create Element, and then select Activity.
  2. Enter Test as the name of the Activity.
  3. Click on Test, and open the Alf editor window (select Windows > Alf), if it isn't already open.
  4. Type the Alf code shown in the figure below.



  5. When the text is correct, click Save.


To run the Test


  1. Right click on Test in the Model Browser, and select Simulation > Run.
  2. In the Simulation window, make sure that the Animation speed slider is at its rightmost position.



  3. Click on the Start button. The output should appear in the Console pane, as shown in the figure below.