Behaviour SwRS-MDOKFSTUDIO-DIAG-050
The host accepts only well-formed include requests
When the host receives a previewPlantUmlInclude message, it SHALL accept it only with a file name that is not blank and at most 4096 characters, a from that is null or a non-empty string of at most 4096 characters, and a non-empty bounded edit id.
Part of StRS-MDOKFSTUDIO-DIAG-009, outside the paths drawn on its map.
Scenarios 3
The situations the tests check; open one to read it.
nominalA well-formed include request
Givena previewPlantUmlInclude message with a 4096-character name, from null and an edit id (see SwRS-MDOKFSTUDIO-TRUST-052 for the envelope)
Whenthe host validates it
Thenit is accepted
the same message with from set to a non-empty file id is accepted
the same message with from set to a non-empty file id is accepted
refusalA malformed include request
Givena previewPlantUmlInclude message with a blank name, a 4097-character name, a name that is not a string, an empty from, a from that is missing or not a string, or a missing or empty edit id
Whenthe host validates it
Thenit is refused, ignored like any value that is not a registered page message, and nothing changes on screen
boundaryBounds of the fields
| Input | Outcome |
|---|---|
| name of 4096 characters | accepted |
| name of 4097 characters | refused |
| name of two spaces | refused (blank) |
| name that is the number 3 | refused |
| from null | accepted (the including file is the document itself) |
| from a non-empty string of at most 4096 characters | accepted |
| from an empty string, undefined or the number 1 | refused |
| editId an empty string or missing | refused |
| editId a non-empty string of at most 100 characters | accepted; the host answers with previewPlantUmlIncludeResult carrying the same editId (see SwRS-MDOKFSTUDIO-TRUST-090) |