Skip to content

Conversation

sappenin
Copy link
Collaborator

@sappenin sappenin commented Feb 16, 2025

Once #594 is merged, this PR improves test coverage of all Transaction sub-classes by adding enhanced JSON deserialization coverage for each flavor of each Transaction. For example the Payment transaction can be deserialized via at least three different mechanisms:

  1. By pointing the Jackson ObjectMapper to a Transaction class (in which case, TransactionDeserializer will be engaged, delegating to the Immutable JSON implementation);
  2. By pointing the Jackson ObjectMapper to a Payment class (in which case, the TransactionDeserialer will be skipped and the Transaction interface will be used, delegating to the to the Immutable JSON implementation);
  3. By pointing the Jackson ObjectMapper to the Immutable implementation itself (e.g., an ImmutablePayment).

This PR adds this additional coverage to ensure proper JSON handling by future developers who may change certain aspects of each Transaction's Interface/Immutable or concrete deserializer without realizing that these changes might subtly affect deserialization based on other related classes.

(Note the large line-count of this PR is due to the addition of a Livenet ledger JSON file that will be merged as part of #590)

@sappenin sappenin changed the base branch from main to df/fixes-590 February 16, 2025 22:36
@sappenin sappenin changed the base branch from df/fixes-590 to main February 16, 2025 22:44
…ction-serde

# Conflicts:
#	xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/jackson/modules/TransactionDeserializer.java
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