Skip to content

test(core): cover EntityRoot new and delete lifecycle semantics #23

Description

@philipgreat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjavaPull requests that update java code

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions