Background
EntityRoot owns new/deleted key sets and coordinates pending field changes. These lifecycle rules are not directly tested.
Scope
Add focused EntityRootTest cases for new and deleted entities. Root merging is tracked separately.
Test cases
markAsNew records only the requested key.
- Repeating
markAsNew is idempotent.
newKeys() is read-only.
markAsDelete records the requested key.
- Repeating
markAsDelete is idempotent.
- Marking an entity deleted clears that entity's pending changes from all change-set scopes.
- Deleting one entity does not clear changes for another entity.
deletedKeys() is read-only.
Acceptance criteria
- Tests require no metadata factory or runtime.
- Lifecycle assertions are scoped to one behavior per test method.
Background
EntityRootowns new/deleted key sets and coordinates pending field changes. These lifecycle rules are not directly tested.Scope
Add focused
EntityRootTestcases for new and deleted entities. Root merging is tracked separately.Test cases
markAsNewrecords only the requested key.markAsNewis idempotent.newKeys()is read-only.markAsDeleterecords the requested key.markAsDeleteis idempotent.deletedKeys()is read-only.Acceptance criteria