Skip to content

Add string-key ProjectLatest tests#34

Merged
jeremydmiller merged 2 commits intomainfrom
issue-29-project-latest-string-key
Apr 21, 2026
Merged

Add string-key ProjectLatest tests#34
jeremydmiller merged 2 commits intomainfrom
issue-29-project-latest-string-key

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Closes #29

Summary

The ProjectLatest<T>() feature was already fully implemented (both Guid and string-key overloads) with 4 passing tests. This PR adds 2 additional tests covering string-key streams:

  • project_latest_with_string_key_includes_pending_events — verifies in-flight events from StartStream are projected without committing
  • project_latest_merges_committed_and_pending_for_string_key — verifies committed + uncommitted events are merged in the projection

Both tests confirm that the forced SaveChangesAsync() flush is unnecessary when using ProjectLatest<T>() — exactly the pattern described in the issue.

Test plan

  • All 6 ProjectLatest tests pass (4 existing + 2 new)

🤖 Generated with Claude Code

jeremydmiller and others added 2 commits April 21, 2026 08:34
Closes #29

The ProjectLatest<T> feature was already implemented (both Guid and
string overloads) with 4 passing tests. This adds 2 more tests
covering string-key streams specifically:

- project_latest_with_string_key_includes_pending_events
- project_latest_merges_committed_and_pending_for_string_key

Both verify that in-flight (uncommitted) events are included in the
projected aggregate, eliminating the need for a forced SaveChanges
flush before reading projected state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Expand the project-latest docs page with motivation section, behavior
details, merge example, and string-key stream coverage — mirroring
the equivalent Marten documentation.

Add mdsnippets region markers to the test file so code samples are
automatically injected into the docs at build time.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit fc7c6e3 into main Apr 21, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Advance a single stream projection to the latest pending version including in-flight events

1 participant