-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new package and initial CRUD analysis
- Loading branch information
1 parent
6239d04
commit 2832b24
Showing
2 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
challenger/src/test/java/uk/co/compendiumdev/practicemodes/simpleapi/SimpleApiCrudTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package uk.co.compendiumdev.practicemodes.simpleapi; | ||
|
||
public class SimpleApiCrudTest { | ||
|
||
/* | ||
Simple tests based on CRUD flows for ELH | ||
Item | ||
/ | \ | ||
Create Existing (*) Delete | ||
/ \ | ||
Read (o) Update (o) | ||
*/ | ||
|
||
/* | ||
Paths To Cover: | ||
- C - leave alone | ||
- CD | ||
- CRD | ||
- CRUD | ||
- existing variants (how far to push it?) | ||
- CRRRD - how many? why? this would primarily be for multi-user interaction (can we see others' amendments) | ||
- CUUUUD - how many? why? this would be for field considerations and potential multi-user update clashes | ||
- CRRUURRD - variants of RU - again why? at a path level this is overkill, what do we think we would gain from this? | ||
For a CRUD flow to work it has to be valid, so all of the above are 'valid' | ||
e.g. | ||
- C | ||
- valid details (valid values for all fields) | ||
- minimum (mandatory fields only) | ||
- mix of optional fields + mandatory fields | ||
- maximum (all fields) | ||
- field formats? e.g. can use strings for price? "12.12" [exclude from CRUD] | ||
- field values? min max etc. [exclude from CRUD] | ||
- R | ||
- existing | ||
- U | ||
- existing | ||
- minimum (mandatory fields only) (PUT and POST are different) | ||
- mix ( mix of optional and mandatory) | ||
- maximum (all fields) | ||
- D | ||
- existing | ||
- update based on a variety of low level field changes | ||
- REST Overlay (POST, PUT) | ||
- expand diagram to include a new layer under update | ||
- POST (all field update) | ||
- PUT (all field update) | ||
Invalid operations: | ||
- C | ||
- with invalid data such that it is not created | ||
- duplicate | ||
- R | ||
- a non-existing item | ||
- (not-created yet, previously deleted) | ||
- invalid for rendering in output(could invalid data get into the system?) | ||
[doesn't seem feasible with current data fields] | ||
- in invalid state (e.g. multi-user, while being updated) [exclude from CRUD] | ||
- U | ||
- update a non-existing item | ||
- (not-created yet, previously deleted) | ||
- update to become duplicate item should fail | ||
- can't update id [double check this] | ||
- can't have duplicate iban13 | ||
- update when someone else has updated (multi-user) [exclude from CRUD] | ||
- PUT and POST have different update conditions? | ||
- treat updates as a Matrix transformation of field conditions | ||
- below minimum (none of the fields - error or no update?) | ||
- above maximum (more fields than required: extra fields, duplicate fields) [exclude from CRUD?] | ||
- D | ||
- delete a non-existing item | ||
- (not-created yet, previously deleted) | ||
*/ | ||
} |
2 changes: 1 addition & 1 deletion
2
...mdev/practicemodes/SimpleApiModeTest.java → ...icemodes/simpleapi/SimpleApiModeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters