This test builds on the optional exercise from the last chapter.
This time:
VerifyNames.jst
(or whatever you called your Names test) and add parameters.
VerifyNames.jst
to support parameter passing.
VerifyNames.jst
into Acceptance.jst
, naming the modified JST Acceptance2.jst
.
If you did not do the exercise for the last chapter, copy the following files from \tutorial\modular
:
VerifyNames.jst
and
OpenNames.classOpenNames.java
and
SelectName.classSelectName.java
and
VerifyRecord.classVerifyRecord.java
and
CloseNames.classCloseNames.java
Acceptance2.jst
This solution uses a modified version of Acceptance.jst
from this lesson and saves that as Acceptance2.jst
. If you did the exercise this way, you didn't have to add all the parameter information for AddRecord
and VerifySearch
to the previous version of Acceptance2.jst
.
Only one script needed parameters to work within the current model, and that's SelectName
. This solution changes the SelectName
node within VerifyNames.jst
to inherit args[0]
(the name field of the record) from Acceptance2.jst
. You can see the solution shows the SelectName
script referencing args[0]
in place of "Count von Count"
. If you did this, you also should have removed the position reference in the select()
call to make the script more versatile.
VerifyRecord
is the same script already modified earlier in this chapter, so you only needed to change VerifyRecord
node within VerfiyNames.jst
to inherit args[0]
through args[5]
.
Changing the VerifyNames
node in Acceptance2.jst
to also inherit args[0]
through args[5]
completes the solution. You can view these files in the \tutorial\parameters
directory.
Send feedback to
JavaStar-feedback@suntest.com
Copyright © 1998
Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303.
All rights reserved.