Skip to content

Testing Solution 2 - BatchContext Friend Class#11

Draft
riley-dixon wants to merge 3 commits intodevelopfrom
rildixon/batch-mock-operation-2
Draft

Testing Solution 2 - BatchContext Friend Class#11
riley-dixon wants to merge 3 commits intodevelopfrom
rildixon/batch-mock-operation-2

Conversation

@riley-dixon
Copy link
Owner

This is perhaps the simplest approach with introducing a Friend class that can directly access & modify the hidden outstanding_ops set for testing purposes. This would allow a test to seed a test with a given configuration of ops, eliminating the need to use other BatchContext functions to setup the test (and as such, the test also being reliant on the correct operation of those tests).

Create a friend class of BatchContext to be able to peer into
BatchContext's private members. This class should not be used in any
production code. It is used to be able to seed the BatchContext with
mocked Operation data. This will be useful in the future if we
want to unit test what happens with completed/failed operations.
@riley-dixon riley-dixon changed the title Testing Solution 1 - BatchContext Friend Class Testing Solution 2 - BatchContext Friend Class Dec 5, 2025
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.

1 participant