From 1681beb1ac370b36f5279a798e987c381d82b53e Mon Sep 17 00:00:00 2001 From: jamesm Date: Fri, 31 May 2024 16:38:17 -0400 Subject: [PATCH] cleaned up test support packages and paramterized existing tests for solana message encoding the tests are really slow, need to speed them up somehow - must look at the start-up script for the validator container and see if there's any configuration to tweak to move things along a bit --- build.gradle | 2 ++ ...ressLookupTableProgramIntegrationTest.java | 17 +++++++++++------ .../LegacyEncodingIntegrationTest.java | 12 ------------ .../programs/V0EncodingIntegrationTest.java | 12 ------------ .../java/com/lmax/solana4j/SolanaDriver.java | 17 +++++++++++------ .../java/com/lmax/solana4j/SolanaNodeDsl.java | 16 ++++++++++------ .../java/com/lmax/solana4j/TestContext.java | 2 ++ .../java/com/lmax/solana4j/Waiter.java | 2 +- .../{assertions => assertion}/Assertion.java | 2 +- .../IsEqualToAssertion.java | 2 +- .../IsNotNullAssertion.java | 2 +- .../solana4j/base}/IntegrationTestBase.java | 4 ++-- .../MessageEncodingArgumentsParameter.java | 19 +++++++++++++++++++ .../ParameterizedMessageEncodingTest.java | 17 +++++++++++++++++ .../api/AccountInfo.java | 2 +- .../api/AccountInfoParsedData.java | 2 +- .../api/AccountKey.java | 2 +- .../api/AddressTableLookup.java | 2 +- .../api/BlockResponse.java | 2 +- .../{testclient => client}/api/Blockhash.java | 2 +- .../api/Commitment.java | 2 +- .../{testclient => client}/api/Context.java | 2 +- .../{testclient => client}/api/Encoding.java | 2 +- .../{testclient => client}/api/Header.java | 2 +- .../api/InnerInstruction.java | 2 +- .../api/Instruction.java | 2 +- .../{testclient => client}/api/Message.java | 2 +- .../api/ProgramAccountResponse.java | 2 +- .../{testclient => client}/api/Reward.java | 2 +- .../api/SignatureInfo.java | 2 +- .../api/SignatureStatus.java | 2 +- .../{testclient => client}/api/SolanaApi.java | 2 +- .../api/SolanaRpcResponse.java | 2 +- .../api/TokenAccount.java | 2 +- .../api/TokenAmount.java | 2 +- .../api/TokenBalance.java | 2 +- .../api/Transaction.java | 2 +- .../api/TransactionData.java | 2 +- .../api/TransactionMetadata.java | 2 +- .../api/TransactionResponse.java | 2 +- .../jsonrpc/AccountInfoDTO.java | 8 ++++---- .../jsonrpc/AccountInfoParsedDataDTO.java | 6 +++--- .../jsonrpc/AccountKeyDTO.java | 4 ++-- .../jsonrpc/AddressTableLookupDTO.java | 4 ++-- .../jsonrpc/BalanceDTO.java | 4 ++-- .../jsonrpc/BlockResponseDTO.java | 6 +++--- .../jsonrpc/BlockhashDTO.java | 6 +++--- .../jsonrpc/ContextDTO.java | 4 ++-- .../jsonrpc/HeaderDTO.java | 4 ++-- .../jsonrpc/InnerInstructionDTO.java | 6 +++--- .../jsonrpc/InstructionDTO.java | 4 ++-- .../jsonrpc/MessageDTO.java | 8 ++++---- .../jsonrpc/MetaDTO.java | 10 +++++----- .../jsonrpc/ProgramAccountResponseDTO.java | 6 +++--- .../jsonrpc/RewardDTO.java | 4 ++-- .../jsonrpc/RpcWrapperDTO.java | 2 +- .../jsonrpc/SignatureInfoDTO.java | 6 +++--- .../jsonrpc/SignatureStatusesDTO.java | 10 +++++----- .../jsonrpc/SolanaClient.java | 14 +++++++------- .../jsonrpc/SolanaClientRetryStrategy.java | 2 +- .../jsonrpc/SolanaCodec.java | 2 +- .../SolanaJsonRpcClientRuntimeException.java | 2 +- .../jsonrpc/SolanaRpcClient.java | 2 +- .../jsonrpc/TokenAccountsByOwnerDTO.java | 8 ++++---- .../jsonrpc/TokenAmountDTO.java | 6 +++--- .../jsonrpc/TokenBalanceDTO.java | 6 +++--- .../jsonrpc/TransactionDTO.java | 6 +++--- .../jsonrpc/TransactionDataDTO.java | 8 ++++---- .../jsonrpc/TransactionResponseDTO.java | 6 +++--- .../{ => domain}/BouncyCastleSigner.java | 2 +- .../com/lmax/solana4j/{ => domain}/Sol.java | 2 +- .../solana4j/{ => domain}/TestKeyPair.java | 3 ++- .../{ => domain}/TestKeyPairGenerator.java | 2 +- .../solana4j/{ => domain}/TestPublicKey.java | 3 ++- .../LegacyTransactionFactory.java | 6 +++++- .../{ => transaction}/TransactionFactory.java | 3 ++- .../V0TransactionFactory.java | 6 +++++- 77 files changed, 205 insertions(+), 164 deletions(-) delete mode 100644 src/integration-test/java/com/lmax/solana4j/programs/LegacyEncodingIntegrationTest.java delete mode 100644 src/integration-test/java/com/lmax/solana4j/programs/V0EncodingIntegrationTest.java rename src/test-support/java/com/lmax/solana4j/{assertions => assertion}/Assertion.java (74%) rename src/test-support/java/com/lmax/solana4j/{assertions => assertion}/IsEqualToAssertion.java (95%) rename src/test-support/java/com/lmax/solana4j/{assertions => assertion}/IsNotNullAssertion.java (95%) rename src/{integration-test/java/com/lmax/solana4j/programs => test-support/java/com/lmax/solana4j/base}/IntegrationTestBase.java (95%) create mode 100644 src/test-support/java/com/lmax/solana4j/base/MessageEncodingArgumentsParameter.java create mode 100644 src/test-support/java/com/lmax/solana4j/base/ParameterizedMessageEncodingTest.java rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/AccountInfo.java (81%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/AccountInfoParsedData.java (87%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/AccountKey.java (83%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/AddressTableLookup.java (80%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/BlockResponse.java (85%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/Blockhash.java (74%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/Commitment.java (87%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/Context.java (54%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/Encoding.java (56%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/Header.java (78%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/InnerInstruction.java (75%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/Instruction.java (77%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/Message.java (85%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/ProgramAccountResponse.java (70%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/Reward.java (79%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/SignatureInfo.java (82%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/SignatureStatus.java (78%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/SolanaApi.java (93%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/SolanaRpcResponse.java (67%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/TokenAccount.java (69%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/TokenAmount.java (77%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/TokenBalance.java (80%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/Transaction.java (72%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/TransactionData.java (79%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/TransactionMetadata.java (90%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/api/TransactionResponse.java (80%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/AccountInfoDTO.java (93%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/AccountInfoParsedDataDTO.java (95%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/AccountKeyDTO.java (92%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/AddressTableLookupDTO.java (92%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/BalanceDTO.java (88%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/BlockResponseDTO.java (93%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/BlockhashDTO.java (93%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/ContextDTO.java (84%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/HeaderDTO.java (94%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/InnerInstructionDTO.java (86%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/InstructionDTO.java (92%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/MessageDTO.java (90%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/MetaDTO.java (92%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/ProgramAccountResponseDTO.java (84%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/RewardDTO.java (94%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/RpcWrapperDTO.java (96%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/SignatureInfoDTO.java (92%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/SignatureStatusesDTO.java (88%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/SolanaClient.java (90%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/SolanaClientRetryStrategy.java (95%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/SolanaCodec.java (97%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/SolanaJsonRpcClientRuntimeException.java (78%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/SolanaRpcClient.java (98%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/TokenAccountsByOwnerDTO.java (87%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/TokenAmountDTO.java (93%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/TokenBalanceDTO.java (91%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/TransactionDTO.java (84%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/TransactionDataDTO.java (85%) rename src/test-support/java/com/lmax/solana4j/{testclient => client}/jsonrpc/TransactionResponseDTO.java (89%) rename src/test-support/java/com/lmax/solana4j/{ => domain}/BouncyCastleSigner.java (95%) rename src/test-support/java/com/lmax/solana4j/{ => domain}/Sol.java (86%) rename src/test-support/java/com/lmax/solana4j/{ => domain}/TestKeyPair.java (91%) rename src/test-support/java/com/lmax/solana4j/{ => domain}/TestKeyPairGenerator.java (93%) rename src/test-support/java/com/lmax/solana4j/{ => domain}/TestPublicKey.java (87%) rename src/test-support/java/com/lmax/solana4j/{ => transaction}/LegacyTransactionFactory.java (94%) rename src/test-support/java/com/lmax/solana4j/{ => transaction}/TransactionFactory.java (92%) rename src/test-support/java/com/lmax/solana4j/{ => transaction}/V0TransactionFactory.java (94%) diff --git a/build.gradle b/build.gradle index 089241e2..8a076fed 100644 --- a/build.gradle +++ b/build.gradle @@ -61,6 +61,7 @@ dependencies { testSupportImplementation 'com.lmax:simple-dsl:3.0.0' testSupportImplementation 'org.assertj:assertj-core:3.25.3' testSupportImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' + testSupportImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2' testSupportImplementation 'com.fasterxml.jackson.core:jackson-core:2.17.1' testSupportImplementation 'com.fasterxml.jackson.core:jackson-databind:2.17.1' testSupportImplementation 'org.apache.httpcomponents:httpclient:4.5.14' @@ -69,6 +70,7 @@ dependencies { // test dependencies testImplementation 'org.assertj:assertj-core:3.25.3' testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' + testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2' testImplementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.23.1' testImplementation 'org.slf4j:slf4j-api:2.0.13' diff --git a/src/integration-test/java/com/lmax/solana4j/programs/AddressLookupTableProgramIntegrationTest.java b/src/integration-test/java/com/lmax/solana4j/programs/AddressLookupTableProgramIntegrationTest.java index 9b014971..0d7666dc 100644 --- a/src/integration-test/java/com/lmax/solana4j/programs/AddressLookupTableProgramIntegrationTest.java +++ b/src/integration-test/java/com/lmax/solana4j/programs/AddressLookupTableProgramIntegrationTest.java @@ -1,9 +1,10 @@ package com.lmax.solana4j.programs; +import com.lmax.solana4j.base.IntegrationTestBase; +import com.lmax.solana4j.base.ParameterizedMessageEncodingTest; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -final class AddressLookupTableProgramIntegrationTest extends V0EncodingIntegrationTest +final class AddressLookupTableProgramIntegrationTest extends IntegrationTestBase { @BeforeEach void beforeEachTest() @@ -13,16 +14,20 @@ void beforeEachTest() solana.createKeyPair("addressLookupTableAuthority"); } - @Test - void shouldCreateAddressLookupTable() + @ParameterizedMessageEncodingTest + void shouldCreateAddressLookupTable(final String messageEncoding) { + solana.setMessageEncoding(messageEncoding); + solana.createAddressLookupTable("lookupTableAddress", "addressLookupTableAuthority", "payer"); solana.retrieveAddressLookupTable("lookupTableAddress"); } - @Test - void shouldExtendAddressLookupTable() + @ParameterizedMessageEncodingTest + void shouldExtendAddressLookupTable(final String messageEncoding) { + solana.setMessageEncoding(messageEncoding); + solana.createAddressLookupTable("lookupTableAddress", "addressLookupTableAuthority", "payer"); solana.createKeyPair("addressForLookupTable1"); diff --git a/src/integration-test/java/com/lmax/solana4j/programs/LegacyEncodingIntegrationTest.java b/src/integration-test/java/com/lmax/solana4j/programs/LegacyEncodingIntegrationTest.java deleted file mode 100644 index 7db3c72e..00000000 --- a/src/integration-test/java/com/lmax/solana4j/programs/LegacyEncodingIntegrationTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.lmax.solana4j.programs; - -import org.junit.jupiter.api.BeforeEach; - -public class LegacyEncodingIntegrationTest extends IntegrationTestBase -{ - @BeforeEach - void setMessageEncoding() - { - solana.setMessageEncoding("Legacy"); - } -} diff --git a/src/integration-test/java/com/lmax/solana4j/programs/V0EncodingIntegrationTest.java b/src/integration-test/java/com/lmax/solana4j/programs/V0EncodingIntegrationTest.java deleted file mode 100644 index 72f197d3..00000000 --- a/src/integration-test/java/com/lmax/solana4j/programs/V0EncodingIntegrationTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.lmax.solana4j.programs; - -import org.junit.jupiter.api.BeforeEach; - -public class V0EncodingIntegrationTest extends IntegrationTestBase -{ - @BeforeEach - void setMessageEncoding() - { - solana.setMessageEncoding("V0"); - } -} diff --git a/src/test-support/java/com/lmax/solana4j/SolanaDriver.java b/src/test-support/java/com/lmax/solana4j/SolanaDriver.java index a199c565..969297bd 100644 --- a/src/test-support/java/com/lmax/solana4j/SolanaDriver.java +++ b/src/test-support/java/com/lmax/solana4j/SolanaDriver.java @@ -2,11 +2,16 @@ import com.lmax.solana4j.api.AddressLookupTable; import com.lmax.solana4j.api.Slot; +import com.lmax.solana4j.domain.TestKeyPair; +import com.lmax.solana4j.domain.TestPublicKey; import com.lmax.solana4j.programs.AddressWithBumpSeed; -import com.lmax.solana4j.testclient.api.AccountInfo; -import com.lmax.solana4j.testclient.api.Commitment; -import com.lmax.solana4j.testclient.api.SolanaApi; -import com.lmax.solana4j.testclient.api.TransactionResponse; +import com.lmax.solana4j.client.api.AccountInfo; +import com.lmax.solana4j.client.api.Commitment; +import com.lmax.solana4j.client.api.SolanaApi; +import com.lmax.solana4j.client.api.TransactionResponse; +import com.lmax.solana4j.transaction.LegacyTransactionFactory; +import com.lmax.solana4j.transaction.TransactionFactory; +import com.lmax.solana4j.transaction.V0TransactionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -53,7 +58,7 @@ public String createAddressLookupTable(final AddressWithBumpSeed addressWithBump final Slot slot, final List addressLookupTables) { - final com.lmax.solana4j.testclient.api.Blockhash recentBlockhash = solanaApi.getRecentBlockHash(); + final com.lmax.solana4j.client.api.Blockhash recentBlockhash = solanaApi.getRecentBlockHash(); final String transactionBlob = getTransactionFactory().createAddressLookupTable( addressWithBumpSeed, @@ -74,7 +79,7 @@ public String extendAddressLookupTable(final TestPublicKey addressLookupTable, final List addressesToAdd, final List addressLookupTables) { - final com.lmax.solana4j.testclient.api.Blockhash recentBlockhash = solanaApi.getRecentBlockHash(); + final com.lmax.solana4j.client.api.Blockhash recentBlockhash = solanaApi.getRecentBlockHash(); final String transactionBlob = getTransactionFactory().extendAddressLookupTable( addressLookupTable.getSolana4jPublicKey(), diff --git a/src/test-support/java/com/lmax/solana4j/SolanaNodeDsl.java b/src/test-support/java/com/lmax/solana4j/SolanaNodeDsl.java index 73082ecd..4a76c216 100644 --- a/src/test-support/java/com/lmax/solana4j/SolanaNodeDsl.java +++ b/src/test-support/java/com/lmax/solana4j/SolanaNodeDsl.java @@ -5,20 +5,24 @@ import com.lmax.simpledsl.api.RequiredArg; import com.lmax.solana4j.api.AddressLookupTable; import com.lmax.solana4j.api.PublicKey; -import com.lmax.solana4j.assertions.IsEqualToAssertion; -import com.lmax.solana4j.assertions.IsNotNullAssertion; +import com.lmax.solana4j.assertion.IsEqualToAssertion; +import com.lmax.solana4j.assertion.IsNotNullAssertion; +import com.lmax.solana4j.domain.Sol; +import com.lmax.solana4j.domain.TestKeyPair; +import com.lmax.solana4j.domain.TestKeyPairGenerator; +import com.lmax.solana4j.domain.TestPublicKey; import com.lmax.solana4j.programs.AddressLookupTableProgram; import com.lmax.solana4j.programs.AddressWithBumpSeed; -import com.lmax.solana4j.testclient.api.AccountInfo; -import com.lmax.solana4j.testclient.api.Commitment; -import com.lmax.solana4j.testclient.jsonrpc.SolanaClient; +import com.lmax.solana4j.client.api.AccountInfo; +import com.lmax.solana4j.client.api.Commitment; +import com.lmax.solana4j.client.jsonrpc.SolanaClient; import org.bouncycastle.util.encoders.Base64; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; -import static com.lmax.solana4j.testclient.api.Commitment.FINALIZED; +import static com.lmax.solana4j.client.api.Commitment.FINALIZED; import static java.util.Arrays.stream; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; diff --git a/src/test-support/java/com/lmax/solana4j/TestContext.java b/src/test-support/java/com/lmax/solana4j/TestContext.java index 61244ab4..d0e60c90 100644 --- a/src/test-support/java/com/lmax/solana4j/TestContext.java +++ b/src/test-support/java/com/lmax/solana4j/TestContext.java @@ -1,6 +1,8 @@ package com.lmax.solana4j; import com.lmax.solana4j.api.AddressLookupTable; +import com.lmax.solana4j.domain.TestKeyPair; +import com.lmax.solana4j.domain.TestPublicKey; import java.util.HashMap; import java.util.Map; diff --git a/src/test-support/java/com/lmax/solana4j/Waiter.java b/src/test-support/java/com/lmax/solana4j/Waiter.java index 706aa24c..b6d2d2d7 100644 --- a/src/test-support/java/com/lmax/solana4j/Waiter.java +++ b/src/test-support/java/com/lmax/solana4j/Waiter.java @@ -1,6 +1,6 @@ package com.lmax.solana4j; -import com.lmax.solana4j.assertions.Assertion; +import com.lmax.solana4j.assertion.Assertion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/test-support/java/com/lmax/solana4j/assertions/Assertion.java b/src/test-support/java/com/lmax/solana4j/assertion/Assertion.java similarity index 74% rename from src/test-support/java/com/lmax/solana4j/assertions/Assertion.java rename to src/test-support/java/com/lmax/solana4j/assertion/Assertion.java index d2416b35..1b0ca7c1 100644 --- a/src/test-support/java/com/lmax/solana4j/assertions/Assertion.java +++ b/src/test-support/java/com/lmax/solana4j/assertion/Assertion.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.assertions; +package com.lmax.solana4j.assertion; public abstract class Assertion { diff --git a/src/test-support/java/com/lmax/solana4j/assertions/IsEqualToAssertion.java b/src/test-support/java/com/lmax/solana4j/assertion/IsEqualToAssertion.java similarity index 95% rename from src/test-support/java/com/lmax/solana4j/assertions/IsEqualToAssertion.java rename to src/test-support/java/com/lmax/solana4j/assertion/IsEqualToAssertion.java index d308bc6a..e60632ac 100644 --- a/src/test-support/java/com/lmax/solana4j/assertions/IsEqualToAssertion.java +++ b/src/test-support/java/com/lmax/solana4j/assertion/IsEqualToAssertion.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.assertions; +package com.lmax.solana4j.assertion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/test-support/java/com/lmax/solana4j/assertions/IsNotNullAssertion.java b/src/test-support/java/com/lmax/solana4j/assertion/IsNotNullAssertion.java similarity index 95% rename from src/test-support/java/com/lmax/solana4j/assertions/IsNotNullAssertion.java rename to src/test-support/java/com/lmax/solana4j/assertion/IsNotNullAssertion.java index e6b8bff5..3d330511 100644 --- a/src/test-support/java/com/lmax/solana4j/assertions/IsNotNullAssertion.java +++ b/src/test-support/java/com/lmax/solana4j/assertion/IsNotNullAssertion.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.assertions; +package com.lmax.solana4j.assertion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/integration-test/java/com/lmax/solana4j/programs/IntegrationTestBase.java b/src/test-support/java/com/lmax/solana4j/base/IntegrationTestBase.java similarity index 95% rename from src/integration-test/java/com/lmax/solana4j/programs/IntegrationTestBase.java rename to src/test-support/java/com/lmax/solana4j/base/IntegrationTestBase.java index f41ee853..808aba4b 100644 --- a/src/integration-test/java/com/lmax/solana4j/programs/IntegrationTestBase.java +++ b/src/test-support/java/com/lmax/solana4j/base/IntegrationTestBase.java @@ -1,11 +1,11 @@ -package com.lmax.solana4j.programs; +package com.lmax.solana4j.base; import com.lmax.solana4j.SolanaNodeDsl; import org.junit.jupiter.api.BeforeEach; import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.Network; -abstract class IntegrationTestBase +public abstract class IntegrationTestBase { public static final int SOLANA_HTTP_PORT = 8899; public static final int SOLANA_WS_PORT = 8900; diff --git a/src/test-support/java/com/lmax/solana4j/base/MessageEncodingArgumentsParameter.java b/src/test-support/java/com/lmax/solana4j/base/MessageEncodingArgumentsParameter.java new file mode 100644 index 00000000..6532f8dd --- /dev/null +++ b/src/test-support/java/com/lmax/solana4j/base/MessageEncodingArgumentsParameter.java @@ -0,0 +1,19 @@ +package com.lmax.solana4j.base; + +import org.junit.jupiter.api.extension.ExtensionContext; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.ArgumentsProvider; + +import java.util.stream.Stream; + +public class MessageEncodingArgumentsParameter implements ArgumentsProvider +{ + @Override + public Stream provideArguments(final ExtensionContext context) + { + return Stream.of( + Arguments.of("V0"), + Arguments.of("Legacy") + ); + } +} diff --git a/src/test-support/java/com/lmax/solana4j/base/ParameterizedMessageEncodingTest.java b/src/test-support/java/com/lmax/solana4j/base/ParameterizedMessageEncodingTest.java new file mode 100644 index 00000000..3491a525 --- /dev/null +++ b/src/test-support/java/com/lmax/solana4j/base/ParameterizedMessageEncodingTest.java @@ -0,0 +1,17 @@ +package com.lmax.solana4j.base; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ArgumentsSource; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@ParameterizedTest(name = "{index}: (Message Encoding {0})") +@ArgumentsSource(MessageEncodingArgumentsParameter.class) +public @interface ParameterizedMessageEncodingTest +{ +} diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/AccountInfo.java b/src/test-support/java/com/lmax/solana4j/client/api/AccountInfo.java similarity index 81% rename from src/test-support/java/com/lmax/solana4j/testclient/api/AccountInfo.java rename to src/test-support/java/com/lmax/solana4j/client/api/AccountInfo.java index 593255ce..617676ac 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/AccountInfo.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/AccountInfo.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/AccountInfoParsedData.java b/src/test-support/java/com/lmax/solana4j/client/api/AccountInfoParsedData.java similarity index 87% rename from src/test-support/java/com/lmax/solana4j/testclient/api/AccountInfoParsedData.java rename to src/test-support/java/com/lmax/solana4j/client/api/AccountInfoParsedData.java index 9879d747..e0fa456d 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/AccountInfoParsedData.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/AccountInfoParsedData.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; import java.util.Map; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/AccountKey.java b/src/test-support/java/com/lmax/solana4j/client/api/AccountKey.java similarity index 83% rename from src/test-support/java/com/lmax/solana4j/testclient/api/AccountKey.java rename to src/test-support/java/com/lmax/solana4j/client/api/AccountKey.java index 70f99bcc..ef35b228 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/AccountKey.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/AccountKey.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface AccountKey { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/AddressTableLookup.java b/src/test-support/java/com/lmax/solana4j/client/api/AddressTableLookup.java similarity index 80% rename from src/test-support/java/com/lmax/solana4j/testclient/api/AddressTableLookup.java rename to src/test-support/java/com/lmax/solana4j/client/api/AddressTableLookup.java index 17fe832f..4f0595c3 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/AddressTableLookup.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/AddressTableLookup.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/BlockResponse.java b/src/test-support/java/com/lmax/solana4j/client/api/BlockResponse.java similarity index 85% rename from src/test-support/java/com/lmax/solana4j/testclient/api/BlockResponse.java rename to src/test-support/java/com/lmax/solana4j/client/api/BlockResponse.java index 9866a576..4a5d980b 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/BlockResponse.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/BlockResponse.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/Blockhash.java b/src/test-support/java/com/lmax/solana4j/client/api/Blockhash.java similarity index 74% rename from src/test-support/java/com/lmax/solana4j/testclient/api/Blockhash.java rename to src/test-support/java/com/lmax/solana4j/client/api/Blockhash.java index a94879dc..49177117 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/Blockhash.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/Blockhash.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface Blockhash { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/Commitment.java b/src/test-support/java/com/lmax/solana4j/client/api/Commitment.java similarity index 87% rename from src/test-support/java/com/lmax/solana4j/testclient/api/Commitment.java rename to src/test-support/java/com/lmax/solana4j/client/api/Commitment.java index 91ffd4fc..5d128865 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/Commitment.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/Commitment.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public enum Commitment { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/Context.java b/src/test-support/java/com/lmax/solana4j/client/api/Context.java similarity index 54% rename from src/test-support/java/com/lmax/solana4j/testclient/api/Context.java rename to src/test-support/java/com/lmax/solana4j/client/api/Context.java index 60d980cc..11d05e24 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/Context.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/Context.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface Context { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/Encoding.java b/src/test-support/java/com/lmax/solana4j/client/api/Encoding.java similarity index 56% rename from src/test-support/java/com/lmax/solana4j/testclient/api/Encoding.java rename to src/test-support/java/com/lmax/solana4j/client/api/Encoding.java index c167a62b..2e643b76 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/Encoding.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/Encoding.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public enum Encoding { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/Header.java b/src/test-support/java/com/lmax/solana4j/client/api/Header.java similarity index 78% rename from src/test-support/java/com/lmax/solana4j/testclient/api/Header.java rename to src/test-support/java/com/lmax/solana4j/client/api/Header.java index 498b1fa9..99dadf8c 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/Header.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/Header.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface Header { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/InnerInstruction.java b/src/test-support/java/com/lmax/solana4j/client/api/InnerInstruction.java similarity index 75% rename from src/test-support/java/com/lmax/solana4j/testclient/api/InnerInstruction.java rename to src/test-support/java/com/lmax/solana4j/client/api/InnerInstruction.java index f4bf9de8..f50dd9ea 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/InnerInstruction.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/InnerInstruction.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/Instruction.java b/src/test-support/java/com/lmax/solana4j/client/api/Instruction.java similarity index 77% rename from src/test-support/java/com/lmax/solana4j/testclient/api/Instruction.java rename to src/test-support/java/com/lmax/solana4j/client/api/Instruction.java index 4b6061ec..22028b6a 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/Instruction.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/Instruction.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/Message.java b/src/test-support/java/com/lmax/solana4j/client/api/Message.java similarity index 85% rename from src/test-support/java/com/lmax/solana4j/testclient/api/Message.java rename to src/test-support/java/com/lmax/solana4j/client/api/Message.java index f308adf6..c22b50b2 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/Message.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/Message.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/ProgramAccountResponse.java b/src/test-support/java/com/lmax/solana4j/client/api/ProgramAccountResponse.java similarity index 70% rename from src/test-support/java/com/lmax/solana4j/testclient/api/ProgramAccountResponse.java rename to src/test-support/java/com/lmax/solana4j/client/api/ProgramAccountResponse.java index cddd3d98..11dd191f 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/ProgramAccountResponse.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/ProgramAccountResponse.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface ProgramAccountResponse { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/Reward.java b/src/test-support/java/com/lmax/solana4j/client/api/Reward.java similarity index 79% rename from src/test-support/java/com/lmax/solana4j/testclient/api/Reward.java rename to src/test-support/java/com/lmax/solana4j/client/api/Reward.java index 7eec5afd..73476dd8 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/Reward.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/Reward.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface Reward { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/SignatureInfo.java b/src/test-support/java/com/lmax/solana4j/client/api/SignatureInfo.java similarity index 82% rename from src/test-support/java/com/lmax/solana4j/testclient/api/SignatureInfo.java rename to src/test-support/java/com/lmax/solana4j/client/api/SignatureInfo.java index 27ad7d0a..c76e795c 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/SignatureInfo.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/SignatureInfo.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface SignatureInfo { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/SignatureStatus.java b/src/test-support/java/com/lmax/solana4j/client/api/SignatureStatus.java similarity index 78% rename from src/test-support/java/com/lmax/solana4j/testclient/api/SignatureStatus.java rename to src/test-support/java/com/lmax/solana4j/client/api/SignatureStatus.java index 7ac637fe..c311c360 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/SignatureStatus.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/SignatureStatus.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface SignatureStatus { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/SolanaApi.java b/src/test-support/java/com/lmax/solana4j/client/api/SolanaApi.java similarity index 93% rename from src/test-support/java/com/lmax/solana4j/testclient/api/SolanaApi.java rename to src/test-support/java/com/lmax/solana4j/client/api/SolanaApi.java index 8040feef..cce7803e 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/SolanaApi.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/SolanaApi.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface SolanaApi { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/SolanaRpcResponse.java b/src/test-support/java/com/lmax/solana4j/client/api/SolanaRpcResponse.java similarity index 67% rename from src/test-support/java/com/lmax/solana4j/testclient/api/SolanaRpcResponse.java rename to src/test-support/java/com/lmax/solana4j/client/api/SolanaRpcResponse.java index 207a42bb..23e439bd 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/SolanaRpcResponse.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/SolanaRpcResponse.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface SolanaRpcResponse { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/TokenAccount.java b/src/test-support/java/com/lmax/solana4j/client/api/TokenAccount.java similarity index 69% rename from src/test-support/java/com/lmax/solana4j/testclient/api/TokenAccount.java rename to src/test-support/java/com/lmax/solana4j/client/api/TokenAccount.java index fafc6277..be1c0876 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/TokenAccount.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/TokenAccount.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface TokenAccount { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/TokenAmount.java b/src/test-support/java/com/lmax/solana4j/client/api/TokenAmount.java similarity index 77% rename from src/test-support/java/com/lmax/solana4j/testclient/api/TokenAmount.java rename to src/test-support/java/com/lmax/solana4j/client/api/TokenAmount.java index 99f1ede6..9868b3cc 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/TokenAmount.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/TokenAmount.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface TokenAmount { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/TokenBalance.java b/src/test-support/java/com/lmax/solana4j/client/api/TokenBalance.java similarity index 80% rename from src/test-support/java/com/lmax/solana4j/testclient/api/TokenBalance.java rename to src/test-support/java/com/lmax/solana4j/client/api/TokenBalance.java index 088ed3fd..55116732 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/TokenBalance.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/TokenBalance.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface TokenBalance { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/Transaction.java b/src/test-support/java/com/lmax/solana4j/client/api/Transaction.java similarity index 72% rename from src/test-support/java/com/lmax/solana4j/testclient/api/Transaction.java rename to src/test-support/java/com/lmax/solana4j/client/api/Transaction.java index cbbf2c79..66d4ba33 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/Transaction.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/Transaction.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface Transaction { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/TransactionData.java b/src/test-support/java/com/lmax/solana4j/client/api/TransactionData.java similarity index 79% rename from src/test-support/java/com/lmax/solana4j/testclient/api/TransactionData.java rename to src/test-support/java/com/lmax/solana4j/client/api/TransactionData.java index 8c638cfc..54c5a016 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/TransactionData.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/TransactionData.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/TransactionMetadata.java b/src/test-support/java/com/lmax/solana4j/client/api/TransactionMetadata.java similarity index 90% rename from src/test-support/java/com/lmax/solana4j/testclient/api/TransactionMetadata.java rename to src/test-support/java/com/lmax/solana4j/client/api/TransactionMetadata.java index 8c84446b..b63a3ec8 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/TransactionMetadata.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/TransactionMetadata.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/api/TransactionResponse.java b/src/test-support/java/com/lmax/solana4j/client/api/TransactionResponse.java similarity index 80% rename from src/test-support/java/com/lmax/solana4j/testclient/api/TransactionResponse.java rename to src/test-support/java/com/lmax/solana4j/client/api/TransactionResponse.java index c789b520..64fd7b0a 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/api/TransactionResponse.java +++ b/src/test-support/java/com/lmax/solana4j/client/api/TransactionResponse.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.api; +package com.lmax.solana4j.client.api; public interface TransactionResponse { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AccountInfoDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/AccountInfoDTO.java similarity index 93% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AccountInfoDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/AccountInfoDTO.java index c73586e4..db2762bb 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AccountInfoDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/AccountInfoDTO.java @@ -1,10 +1,10 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.AccountInfo; -import com.lmax.solana4j.testclient.api.Context; -import com.lmax.solana4j.testclient.api.SolanaRpcResponse; +import com.lmax.solana4j.client.api.AccountInfo; +import com.lmax.solana4j.client.api.Context; +import com.lmax.solana4j.client.api.SolanaRpcResponse; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AccountInfoParsedDataDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/AccountInfoParsedDataDTO.java similarity index 95% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AccountInfoParsedDataDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/AccountInfoParsedDataDTO.java index 5df0fcd9..65b2cb80 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AccountInfoParsedDataDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/AccountInfoParsedDataDTO.java @@ -1,9 +1,9 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.AccountInfoParsedData; -import com.lmax.solana4j.testclient.api.SolanaRpcResponse; +import com.lmax.solana4j.client.api.AccountInfoParsedData; +import com.lmax.solana4j.client.api.SolanaRpcResponse; import java.util.Map; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AccountKeyDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/AccountKeyDTO.java similarity index 92% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AccountKeyDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/AccountKeyDTO.java index b31f07cb..297fc966 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AccountKeyDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/AccountKeyDTO.java @@ -1,8 +1,8 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.AccountKey; +import com.lmax.solana4j.client.api.AccountKey; final class AccountKeyDTO implements AccountKey { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AddressTableLookupDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/AddressTableLookupDTO.java similarity index 92% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AddressTableLookupDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/AddressTableLookupDTO.java index 728f91e3..38c79a93 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/AddressTableLookupDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/AddressTableLookupDTO.java @@ -1,8 +1,8 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.AddressTableLookup; +import com.lmax.solana4j.client.api.AddressTableLookup; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/BalanceDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/BalanceDTO.java similarity index 88% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/BalanceDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/BalanceDTO.java index cca11d3d..662ea3b9 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/BalanceDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/BalanceDTO.java @@ -1,8 +1,8 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.SolanaRpcResponse; +import com.lmax.solana4j.client.api.SolanaRpcResponse; public final class BalanceDTO implements SolanaRpcResponse { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/BlockResponseDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/BlockResponseDTO.java similarity index 93% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/BlockResponseDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/BlockResponseDTO.java index 4d61df08..4d30feb0 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/BlockResponseDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/BlockResponseDTO.java @@ -1,9 +1,9 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.BlockResponse; -import com.lmax.solana4j.testclient.api.Transaction; +import com.lmax.solana4j.client.api.BlockResponse; +import com.lmax.solana4j.client.api.Transaction; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/BlockhashDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/BlockhashDTO.java similarity index 93% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/BlockhashDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/BlockhashDTO.java index 82baaaad..503d7ae4 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/BlockhashDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/BlockhashDTO.java @@ -1,10 +1,10 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.Blockhash; -import com.lmax.solana4j.testclient.api.SolanaRpcResponse; +import com.lmax.solana4j.client.api.Blockhash; +import com.lmax.solana4j.client.api.SolanaRpcResponse; import org.bitcoinj.core.Base58; final class BlockhashDTO implements SolanaRpcResponse diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/ContextDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/ContextDTO.java similarity index 84% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/ContextDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/ContextDTO.java index a26aea6f..07837c91 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/ContextDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/ContextDTO.java @@ -1,8 +1,8 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.Context; +import com.lmax.solana4j.client.api.Context; final class ContextDTO implements Context { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/HeaderDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/HeaderDTO.java similarity index 94% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/HeaderDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/HeaderDTO.java index b9a71d75..466eed58 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/HeaderDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/HeaderDTO.java @@ -1,8 +1,8 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.Header; +import com.lmax.solana4j.client.api.Header; final class HeaderDTO implements Header { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/InnerInstructionDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/InnerInstructionDTO.java similarity index 86% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/InnerInstructionDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/InnerInstructionDTO.java index 1503414a..65dce7c5 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/InnerInstructionDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/InnerInstructionDTO.java @@ -1,9 +1,9 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.InnerInstruction; -import com.lmax.solana4j.testclient.api.Instruction; +import com.lmax.solana4j.client.api.InnerInstruction; +import com.lmax.solana4j.client.api.Instruction; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/InstructionDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/InstructionDTO.java similarity index 92% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/InstructionDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/InstructionDTO.java index 1a311d2c..e416048a 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/InstructionDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/InstructionDTO.java @@ -1,8 +1,8 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.Instruction; +import com.lmax.solana4j.client.api.Instruction; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/MessageDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/MessageDTO.java similarity index 90% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/MessageDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/MessageDTO.java index 46ff6487..991c880f 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/MessageDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/MessageDTO.java @@ -1,10 +1,10 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.AddressTableLookup; -import com.lmax.solana4j.testclient.api.Instruction; -import com.lmax.solana4j.testclient.api.Message; +import com.lmax.solana4j.client.api.AddressTableLookup; +import com.lmax.solana4j.client.api.Instruction; +import com.lmax.solana4j.client.api.Message; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/MetaDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/MetaDTO.java similarity index 92% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/MetaDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/MetaDTO.java index 7ad0df07..187f4a9b 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/MetaDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/MetaDTO.java @@ -1,11 +1,11 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.InnerInstruction; -import com.lmax.solana4j.testclient.api.Reward; -import com.lmax.solana4j.testclient.api.TokenBalance; -import com.lmax.solana4j.testclient.api.TransactionMetadata; +import com.lmax.solana4j.client.api.InnerInstruction; +import com.lmax.solana4j.client.api.Reward; +import com.lmax.solana4j.client.api.TokenBalance; +import com.lmax.solana4j.client.api.TransactionMetadata; import java.util.ArrayList; import java.util.Collections; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/ProgramAccountResponseDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/ProgramAccountResponseDTO.java similarity index 84% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/ProgramAccountResponseDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/ProgramAccountResponseDTO.java index a0b3d790..c1c09ced 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/ProgramAccountResponseDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/ProgramAccountResponseDTO.java @@ -1,9 +1,9 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.AccountInfo; -import com.lmax.solana4j.testclient.api.ProgramAccountResponse; +import com.lmax.solana4j.client.api.AccountInfo; +import com.lmax.solana4j.client.api.ProgramAccountResponse; final class ProgramAccountResponseDTO implements ProgramAccountResponse { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/RewardDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/RewardDTO.java similarity index 94% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/RewardDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/RewardDTO.java index e60ec6e4..adbba25c 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/RewardDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/RewardDTO.java @@ -1,8 +1,8 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.Reward; +import com.lmax.solana4j.client.api.Reward; final class RewardDTO implements Reward { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/RpcWrapperDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/RpcWrapperDTO.java similarity index 96% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/RpcWrapperDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/RpcWrapperDTO.java index bda0315c..800df434 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/RpcWrapperDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/RpcWrapperDTO.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SignatureInfoDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SignatureInfoDTO.java similarity index 92% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SignatureInfoDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/SignatureInfoDTO.java index c1d2f68d..d7f90c63 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SignatureInfoDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SignatureInfoDTO.java @@ -1,9 +1,9 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.Commitment; -import com.lmax.solana4j.testclient.api.SignatureInfo; +import com.lmax.solana4j.client.api.Commitment; +import com.lmax.solana4j.client.api.SignatureInfo; final class SignatureInfoDTO implements SignatureInfo { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SignatureStatusesDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SignatureStatusesDTO.java similarity index 88% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SignatureStatusesDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/SignatureStatusesDTO.java index e6574f2c..eed0d37e 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SignatureStatusesDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SignatureStatusesDTO.java @@ -1,11 +1,11 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.Commitment; -import com.lmax.solana4j.testclient.api.Context; -import com.lmax.solana4j.testclient.api.SignatureStatus; -import com.lmax.solana4j.testclient.api.SolanaRpcResponse; +import com.lmax.solana4j.client.api.Commitment; +import com.lmax.solana4j.client.api.Context; +import com.lmax.solana4j.client.api.SignatureStatus; +import com.lmax.solana4j.client.api.SolanaRpcResponse; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaClient.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaClient.java similarity index 90% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaClient.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaClient.java index a130ec8a..9ea34241 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaClient.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaClient.java @@ -1,12 +1,12 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.core.type.TypeReference; -import com.lmax.solana4j.testclient.api.AccountInfo; -import com.lmax.solana4j.testclient.api.Blockhash; -import com.lmax.solana4j.testclient.api.Commitment; -import com.lmax.solana4j.testclient.api.SolanaApi; -import com.lmax.solana4j.testclient.api.TokenAmount; -import com.lmax.solana4j.testclient.api.TransactionResponse; +import com.lmax.solana4j.client.api.AccountInfo; +import com.lmax.solana4j.client.api.Blockhash; +import com.lmax.solana4j.client.api.Commitment; +import com.lmax.solana4j.client.api.SolanaApi; +import com.lmax.solana4j.client.api.TokenAmount; +import com.lmax.solana4j.client.api.TransactionResponse; import java.util.Locale; import java.util.Map; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaClientRetryStrategy.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaClientRetryStrategy.java similarity index 95% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaClientRetryStrategy.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaClientRetryStrategy.java index 10c4765b..deed6270 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaClientRetryStrategy.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaClientRetryStrategy.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaCodec.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaCodec.java similarity index 97% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaCodec.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaCodec.java index 6a89ba2f..c1a7a260 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaCodec.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaCodec.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaJsonRpcClientRuntimeException.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaJsonRpcClientRuntimeException.java similarity index 78% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaJsonRpcClientRuntimeException.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaJsonRpcClientRuntimeException.java index e977004e..f16d7375 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaJsonRpcClientRuntimeException.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaJsonRpcClientRuntimeException.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; public class SolanaJsonRpcClientRuntimeException extends RuntimeException { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaRpcClient.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaRpcClient.java similarity index 98% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaRpcClient.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaRpcClient.java index f67380cd..ea70704d 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/SolanaRpcClient.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/SolanaRpcClient.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.core.type.TypeReference; import org.apache.http.HttpHeaders; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TokenAccountsByOwnerDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TokenAccountsByOwnerDTO.java similarity index 87% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TokenAccountsByOwnerDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/TokenAccountsByOwnerDTO.java index ddbbdefe..a5916a0d 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TokenAccountsByOwnerDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TokenAccountsByOwnerDTO.java @@ -1,10 +1,10 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.Context; -import com.lmax.solana4j.testclient.api.SolanaRpcResponse; -import com.lmax.solana4j.testclient.api.TokenAccount; +import com.lmax.solana4j.client.api.Context; +import com.lmax.solana4j.client.api.SolanaRpcResponse; +import com.lmax.solana4j.client.api.TokenAccount; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TokenAmountDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TokenAmountDTO.java similarity index 93% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TokenAmountDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/TokenAmountDTO.java index 36f50354..43e8c10a 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TokenAmountDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TokenAmountDTO.java @@ -1,9 +1,9 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.SolanaRpcResponse; -import com.lmax.solana4j.testclient.api.TokenAmount; +import com.lmax.solana4j.client.api.SolanaRpcResponse; +import com.lmax.solana4j.client.api.TokenAmount; final class TokenAmountDTO implements SolanaRpcResponse { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TokenBalanceDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TokenBalanceDTO.java similarity index 91% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TokenBalanceDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/TokenBalanceDTO.java index cf2183e3..c42e5556 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TokenBalanceDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TokenBalanceDTO.java @@ -1,9 +1,9 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.TokenAmount; -import com.lmax.solana4j.testclient.api.TokenBalance; +import com.lmax.solana4j.client.api.TokenAmount; +import com.lmax.solana4j.client.api.TokenBalance; final class TokenBalanceDTO implements TokenBalance { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TransactionDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TransactionDTO.java similarity index 84% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TransactionDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/TransactionDTO.java index c1bad683..7e1d16ff 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TransactionDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TransactionDTO.java @@ -1,9 +1,9 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.Transaction; -import com.lmax.solana4j.testclient.api.TransactionData; +import com.lmax.solana4j.client.api.Transaction; +import com.lmax.solana4j.client.api.TransactionData; final class TransactionDTO implements Transaction { diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TransactionDataDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TransactionDataDTO.java similarity index 85% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TransactionDataDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/TransactionDataDTO.java index 13fcd856..ac80567b 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TransactionDataDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TransactionDataDTO.java @@ -1,10 +1,10 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.AccountKey; -import com.lmax.solana4j.testclient.api.Message; -import com.lmax.solana4j.testclient.api.TransactionData; +import com.lmax.solana4j.client.api.AccountKey; +import com.lmax.solana4j.client.api.Message; +import com.lmax.solana4j.client.api.TransactionData; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TransactionResponseDTO.java b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TransactionResponseDTO.java similarity index 89% rename from src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TransactionResponseDTO.java rename to src/test-support/java/com/lmax/solana4j/client/jsonrpc/TransactionResponseDTO.java index 2fccb482..9141e65e 100644 --- a/src/test-support/java/com/lmax/solana4j/testclient/jsonrpc/TransactionResponseDTO.java +++ b/src/test-support/java/com/lmax/solana4j/client/jsonrpc/TransactionResponseDTO.java @@ -1,9 +1,9 @@ -package com.lmax.solana4j.testclient.jsonrpc; +package com.lmax.solana4j.client.jsonrpc; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.lmax.solana4j.testclient.api.TransactionData; -import com.lmax.solana4j.testclient.api.TransactionResponse; +import com.lmax.solana4j.client.api.TransactionData; +import com.lmax.solana4j.client.api.TransactionResponse; final class TransactionResponseDTO implements TransactionResponse { diff --git a/src/test-support/java/com/lmax/solana4j/BouncyCastleSigner.java b/src/test-support/java/com/lmax/solana4j/domain/BouncyCastleSigner.java similarity index 95% rename from src/test-support/java/com/lmax/solana4j/BouncyCastleSigner.java rename to src/test-support/java/com/lmax/solana4j/domain/BouncyCastleSigner.java index da513a48..7ec598d7 100644 --- a/src/test-support/java/com/lmax/solana4j/BouncyCastleSigner.java +++ b/src/test-support/java/com/lmax/solana4j/domain/BouncyCastleSigner.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j; +package com.lmax.solana4j.domain; import com.lmax.solana4j.api.ByteBufferSigner; import org.bouncycastle.math.ec.rfc8032.Ed25519; diff --git a/src/test-support/java/com/lmax/solana4j/Sol.java b/src/test-support/java/com/lmax/solana4j/domain/Sol.java similarity index 86% rename from src/test-support/java/com/lmax/solana4j/Sol.java rename to src/test-support/java/com/lmax/solana4j/domain/Sol.java index 963b8c62..b5426de3 100644 --- a/src/test-support/java/com/lmax/solana4j/Sol.java +++ b/src/test-support/java/com/lmax/solana4j/domain/Sol.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j; +package com.lmax.solana4j.domain; public class Sol { diff --git a/src/test-support/java/com/lmax/solana4j/TestKeyPair.java b/src/test-support/java/com/lmax/solana4j/domain/TestKeyPair.java similarity index 91% rename from src/test-support/java/com/lmax/solana4j/TestKeyPair.java rename to src/test-support/java/com/lmax/solana4j/domain/TestKeyPair.java index 2332cc72..76f2464a 100644 --- a/src/test-support/java/com/lmax/solana4j/TestKeyPair.java +++ b/src/test-support/java/com/lmax/solana4j/domain/TestKeyPair.java @@ -1,5 +1,6 @@ -package com.lmax.solana4j; +package com.lmax.solana4j.domain; +import com.lmax.solana4j.Solana; import com.lmax.solana4j.api.PublicKey; import org.bitcoinj.core.Base58; diff --git a/src/test-support/java/com/lmax/solana4j/TestKeyPairGenerator.java b/src/test-support/java/com/lmax/solana4j/domain/TestKeyPairGenerator.java similarity index 93% rename from src/test-support/java/com/lmax/solana4j/TestKeyPairGenerator.java rename to src/test-support/java/com/lmax/solana4j/domain/TestKeyPairGenerator.java index 093f004f..e10c79eb 100644 --- a/src/test-support/java/com/lmax/solana4j/TestKeyPairGenerator.java +++ b/src/test-support/java/com/lmax/solana4j/domain/TestKeyPairGenerator.java @@ -1,4 +1,4 @@ -package com.lmax.solana4j; +package com.lmax.solana4j.domain; import org.bouncycastle.math.ec.rfc8032.Ed25519; diff --git a/src/test-support/java/com/lmax/solana4j/TestPublicKey.java b/src/test-support/java/com/lmax/solana4j/domain/TestPublicKey.java similarity index 87% rename from src/test-support/java/com/lmax/solana4j/TestPublicKey.java rename to src/test-support/java/com/lmax/solana4j/domain/TestPublicKey.java index 5499dc23..602248e9 100644 --- a/src/test-support/java/com/lmax/solana4j/TestPublicKey.java +++ b/src/test-support/java/com/lmax/solana4j/domain/TestPublicKey.java @@ -1,5 +1,6 @@ -package com.lmax.solana4j; +package com.lmax.solana4j.domain; +import com.lmax.solana4j.Solana; import org.bitcoinj.core.Base58; public class TestPublicKey diff --git a/src/test-support/java/com/lmax/solana4j/LegacyTransactionFactory.java b/src/test-support/java/com/lmax/solana4j/transaction/LegacyTransactionFactory.java similarity index 94% rename from src/test-support/java/com/lmax/solana4j/LegacyTransactionFactory.java rename to src/test-support/java/com/lmax/solana4j/transaction/LegacyTransactionFactory.java index 10afcfde..7032d126 100644 --- a/src/test-support/java/com/lmax/solana4j/LegacyTransactionFactory.java +++ b/src/test-support/java/com/lmax/solana4j/transaction/LegacyTransactionFactory.java @@ -1,10 +1,14 @@ -package com.lmax.solana4j; +package com.lmax.solana4j.transaction; +import com.lmax.solana4j.ByteBufferPrimitiveArray; +import com.lmax.solana4j.Solana; import com.lmax.solana4j.api.AddressLookupTable; import com.lmax.solana4j.api.Blockhash; import com.lmax.solana4j.api.PublicKey; import com.lmax.solana4j.api.SignedMessageBuilder; import com.lmax.solana4j.api.Slot; +import com.lmax.solana4j.domain.BouncyCastleSigner; +import com.lmax.solana4j.domain.TestKeyPair; import com.lmax.solana4j.programs.AddressLookupTableProgram; import com.lmax.solana4j.programs.AddressWithBumpSeed; import org.bitcoinj.core.Base58; diff --git a/src/test-support/java/com/lmax/solana4j/TransactionFactory.java b/src/test-support/java/com/lmax/solana4j/transaction/TransactionFactory.java similarity index 92% rename from src/test-support/java/com/lmax/solana4j/TransactionFactory.java rename to src/test-support/java/com/lmax/solana4j/transaction/TransactionFactory.java index 8c640965..20b4837d 100644 --- a/src/test-support/java/com/lmax/solana4j/TransactionFactory.java +++ b/src/test-support/java/com/lmax/solana4j/transaction/TransactionFactory.java @@ -1,9 +1,10 @@ -package com.lmax.solana4j; +package com.lmax.solana4j.transaction; import com.lmax.solana4j.api.AddressLookupTable; import com.lmax.solana4j.api.Blockhash; import com.lmax.solana4j.api.PublicKey; import com.lmax.solana4j.api.Slot; +import com.lmax.solana4j.domain.TestKeyPair; import com.lmax.solana4j.programs.AddressWithBumpSeed; import java.util.List; diff --git a/src/test-support/java/com/lmax/solana4j/V0TransactionFactory.java b/src/test-support/java/com/lmax/solana4j/transaction/V0TransactionFactory.java similarity index 94% rename from src/test-support/java/com/lmax/solana4j/V0TransactionFactory.java rename to src/test-support/java/com/lmax/solana4j/transaction/V0TransactionFactory.java index e799cfd9..b9d54ad7 100644 --- a/src/test-support/java/com/lmax/solana4j/V0TransactionFactory.java +++ b/src/test-support/java/com/lmax/solana4j/transaction/V0TransactionFactory.java @@ -1,10 +1,14 @@ -package com.lmax.solana4j; +package com.lmax.solana4j.transaction; +import com.lmax.solana4j.ByteBufferPrimitiveArray; +import com.lmax.solana4j.Solana; import com.lmax.solana4j.api.AddressLookupTable; import com.lmax.solana4j.api.Blockhash; import com.lmax.solana4j.api.PublicKey; import com.lmax.solana4j.api.SignedMessageBuilder; import com.lmax.solana4j.api.Slot; +import com.lmax.solana4j.domain.BouncyCastleSigner; +import com.lmax.solana4j.domain.TestKeyPair; import com.lmax.solana4j.programs.AddressLookupTableProgram; import com.lmax.solana4j.programs.AddressWithBumpSeed; import org.bitcoinj.core.Base58;