BufferedStore Testing Semantics
A BufferedStore is a store that initially writes a buffer and eventually transports data to a destination. The fact that the store is Buffered is an implementation detail and interaction with the store should be transparent to the user.
Reading from a BufferedStore
Each read can be thought of as a query of the form do you have any X?
- describe 1 is asking: do you have any data where record is 1?
- fetch "count", 1 is asking: do you have any data where key is count and record is 1?
- verify "count", 1,1 is aksing: do you have any data where key is count, value is 1 and record is 1
- etc
Each component can answer that question in 1 of 3 ways:
- Yes
- No, because it was removed
- No, because it was never added
Here is the matrix for how component responses should form an overall BufferedStore response:
Destination Response | Buffer Response | Overall Response |
---|---|---|
Yes | Yes | Yes |
Yes | No, because it was removed | |
Yes | No, because it was never added | |
No, removed | Yes | |
No, removed | No, because it was removed | |
No, removed | No, because it was never added | |
No, never had | Yes | |
No, never had | No, because it was removed | |
No, never had | No, because it was never added |