Skip to content

Migrate tests from the old message_parser to test the message_deserializer class#4166

Merged
thsfs merged 8 commits intonanocurrency:developfrom
thsfs:message_parser_to_message_deserializer_test_migration
Mar 7, 2023
Merged

Migrate tests from the old message_parser to test the message_deserializer class#4166
thsfs merged 8 commits intonanocurrency:developfrom
thsfs:message_parser_to_message_deserializer_test_migration

Conversation

@thsfs
Copy link
Copy Markdown
Contributor

@thsfs thsfs commented Mar 3, 2023

The message_parser class is not used any more and will be removed soon. More tests are needed to the message_deserializer class. This PR covers the support and the integrity of the different message types handled.

Thiago Silva added 8 commits March 2, 2023 22:32
The old test checked the bytes generated the same confirm_ack object by
ensuring its visitor was processed only once. Also verified the
parse_status was success. In the new implementation the visitor isn't
part of the deserializer. The outcome object is compared to the
original, and the parse_status should be success. This is the sanity
test, where the deserialization is expected to happen successfully.

Also checks if the message pointer can be downcast to the proper type,
that is the same of verifying its type is supported.
@thsfs thsfs requested review from clemahieu and dsiganos March 3, 2023 01:57
@thsfs thsfs added the unit test Related to a new, changed or fixed unit test label Mar 3, 2023
@thsfs thsfs merged commit 955c79e into nanocurrency:develop Mar 7, 2023
@thsfs thsfs deleted the message_parser_to_message_deserializer_test_migration branch March 7, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unit test Related to a new, changed or fixed unit test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants