Testing Solution 2 - BatchContext Friend Class#11
Draft
riley-dixon wants to merge 3 commits intodevelopfrom
Draft
Testing Solution 2 - BatchContext Friend Class#11riley-dixon wants to merge 3 commits intodevelopfrom
riley-dixon wants to merge 3 commits intodevelopfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is perhaps the simplest approach with introducing a Friend class that can directly access & modify the hidden
outstanding_opsset 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).