| 1 |
description: "entity-client-storeEventsAsEntities" |
| 2 |
|
| 3 |
schemaVersion: "1.2" |
| 4 |
|
| 5 |
createEntities: |
| 6 |
- client: |
| 7 |
id: &client0 client0 |
| 8 |
storeEventsAsEntities: |
| 9 |
- id: client0_events |
| 10 |
events: ["CommandStartedEvent", "CommandSucceededEvent", "CommandFailedEvent"] |
| 11 |
- database: |
| 12 |
id: &database0 database0 |
| 13 |
client: *client0 |
| 14 |
databaseName: &database0Name test |
| 15 |
- collection: |
| 16 |
id: &collection0 collection0 |
| 17 |
database: *database0 |
| 18 |
collectionName: &collection0Name coll0 |
| 19 |
|
| 20 |
initialData: |
| 21 |
- collectionName: *collection0Name |
| 22 |
databaseName: *database0Name |
| 23 |
documents: |
| 24 |
- { _id: 1, x: 11 } |
| 25 |
|
| 26 |
tests: |
| 27 |
# Note: this test does not assert that the events are actually saved to the |
| 28 |
# entity since there is presently no assertion syntax to do so. We are only |
| 29 |
# asserting that the test executes successfully. |
| 30 |
- description: "storeEventsAsEntities captures events" |
| 31 |
operations: |
| 32 |
- name: find |
| 33 |
object: *collection0 |
| 34 |
arguments: |
| 35 |
filter: {} |
| 36 |
expectResult: |
| 37 |
- { _id: 1, x: 11 } |