Design: 03.05/P02
This is an abstract, language-independent design. Grim
details may be found in the
corresponding source code.
You may return to the
documentation
for the module containing this program design, or to the
entire hierarchical table of
topics covered by the PVT.
PROGRAM 2: Delete structure networks from archive
CHARACTERISTICS: nnnn
OPERATOR SCRIPT: passive test.
DESIGN:
set up standard networks in CSS
open new archive file, with arid = archive identifier
<archive all structures>, into arid
allstr = all structures = 100,101,102,103,104,105,106,107,108,109
110,111,113,114,115,120,130,140,142
spcstr = specified network structures = 107,114,105
delstr = deleted network structures = 105,110,114,108,111,115,107,113
<delete structure networks from archive> arid, spcstr
<retrieve structure identifiers> with arid
to determine actstr = actual list of archived structures
TEST: #SR 2 4
"Only the structures explicitly listed as parameters of <delete
structure networks from archive> and their descendants should
be deleted from the specified open archive file."
pass/fail depending on (actstr = (allstr - delstr))
delete with a structure network not in archive
spcstr = 155
<delete structure networks from archive> arid, spcstr
<retrieve structure identifiers> with arid
to determine newstr = new list of archived structures
TEST: #SR 2 5
"If the specified structure does not exist in the
archive file, then <delete structure networks from archive>
should result in no action with regards to that structure
network."
pass/fail depending on (newstr = actstr)
TEST: #SR 2 5
"If the specified structure does not exist in the archive file,
then <delete structure networks from archive> should signal
error 407."
pass/fail depending on (error = 407)
delete with structure networks both in and not-in archive
spcstr = 104, 177, 140
delstr = 104, 109, 140, 142
<delete structure networks from archive> arid, spcstr
<retrieve structure identifiers> with arid
to determine actstr = new list of archived structures
TEST: #SR 2 4 5
"If the list of specified structures to be deleted from the
archive file contains structure networks that exist and do not
exist in the archive file, then those structure networks that
exist should be deleted from the archive and no action is taken
for those structures that do not exist in the archive file."
pass/fail depending on (actstr = (newstr - delstr))
TEST: #SR 2 5
"If the list of specified structure networks to be deleted
from the archive file contains structures that do not
exist in the archive file, then error 407 should be signalled."
pass/fail depending on (error = 407)
<close archive file> with arid
END PROGRAM 2