Section 5

Modify Package Definition

We have the graphics, model and unit tests all within the same package. If at a future time you wanted to only distribute a Monticello package of the code to play the game, you would not want to include the unit tests package.

The solution is to rename the unit tests package. From the class browser, select the unit tests system category for our Laser Game and use the rename menu choice to rename the category to "LaserGame-Tests".

Now open the Monticello browser and click the "+Package" button to add this package name. Again, use "LaserGame-Tests" (without the quotes). Save the package into the same projects repository we have already been using. Save as version 1.

We also need to save the "Laser-Game" package, which no longer has the unit tests included. Save as version 14.

From this point forward we likely be saving both packages everytime we make a change to our Laser Game. But we do now have the tests separated and have a package that can be used for just playing the game.

Index Page Next Page

Copyright © 2007, 2008, 2009, 2010 Stephan B Wessels