DATAGO-70002: Status on CommandMessage tests #162
Merged
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.
What is the purpose of this change?
Add a couple tests to ensure this works probably
How was this change implemented?
Added two tests that check different error scenarios.
I also tried adding a test for the case where the CommandType is unknown. Seems like it's not possible with JUnit5 because we need something like (at)BeforeClass and some tricky mocking of the CommandType enum to add a fake type.
Alternatively, we could apparently make another copy of that enum in the test package and use that one instead, but that seemed poor and would only work with maven and some trickery. Probably not worth it but cool to try.
How was this change tested?
I ran the tests
Is there anything the reviewers should focus on/be aware of?