Background
EntityChangeSet is the smallest mutable unit in the entity ledger and currently has no direct tests.
Scope
Add a focused EntityChangeSetTest.
Test cases
- A new change set is empty.
- Setting a field makes it readable by entity key and field name.
- Setting the same field twice keeps the latest value.
- Changes for two entity keys remain isolated.
fieldNames(key) returns only fields changed for that key.
clearEntity(key) removes only the target entity's changes.
- The map returned by
changes() cannot be structurally modified.
- The set returned by
fieldNames() cannot be modified.
Acceptance criteria
- Tests are deterministic and require no runtime or database fixture.
- Each assertion describes one public
EntityChangeSet contract.
Background
EntityChangeSetis the smallest mutable unit in the entity ledger and currently has no direct tests.Scope
Add a focused
EntityChangeSetTest.Test cases
fieldNames(key)returns only fields changed for that key.clearEntity(key)removes only the target entity's changes.changes()cannot be structurally modified.fieldNames()cannot be modified.Acceptance criteria
EntityChangeSetcontract.