Skip to content

Commit

Permalink
Add remaining @disabled contract tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-james committed Oct 25, 2024
1 parent d563773 commit 2a33563
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.lmax.solana4j.assertion.Condition;
import com.lmax.solana4j.assertion.Waiter;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
Expand Down Expand Up @@ -41,4 +42,18 @@ void shouldGetAccountInfo()
assertThat(accountInfo.getRentEpoch()).isEqualTo("18446744073709551615");
assertThat(accountInfo.getSpace()).isEqualTo(0);
}

@Test
@Disabled
void shouldThrowRpcExceptionForAccount()
{

}

@Test
@Disabled
void shouldThrowRpcExceptionForMalformedAccount()
{

}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.lmax.solana4j.client.jsonrpc;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -23,4 +24,18 @@ void shouldGetBalance()
// }
assertThat(api.getBalance(payerAccount)).isEqualTo(600000L);
}

@Test
@Disabled
void shouldThrowRpcExceptionForUnknownAccountBalance()
{

}

@Test
@Disabled
void shouldThrowRpcExceptionForMalformedAccountBalance()
{

}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.lmax.solana4j.client.jsonrpc;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -18,4 +19,11 @@ void shouldGetMinimumBalanceForRentExemption()

assertThat(api.getMinimumBalanceForRentExemption(1000)).isGreaterThan(0L);
}

@Test
@Disabled
void whatHappensWithNegativeOrZeroSpace()
{

}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.lmax.solana4j.client.jsonrpc;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
Expand Down Expand Up @@ -33,4 +34,19 @@ void shouldGetTokenAccountBalance()
assertThat(tokenAccountBalance.getUiAmountString()).isEqualTo("0.0000000000000001");
assertThat(tokenAccountBalance.getUiAmount()).isEqualTo(0.0000000000000001f);
}

@Test
@Disabled
void shouldThrowRpcExceptionForUnknownTokenAccountBalance()
{

}

@Test
@Disabled
void shouldThrowRpcExceptionForMalformedTokenAccountBalance()
{

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,18 @@ void shouldGetTransaction()
final var transaction = Waiter.waitFor(Condition.isNotNull(() -> api.getTransaction(transactionSignature)));
}
}

@Test
@Disabled
void shouldThrowRpcExceptionForUnknownTransactionSignature()
{

}

@Test
@Disabled
void shouldThrowRpcExceptionForMalformedTransactionSignature()
{

}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.lmax.solana4j.client.jsonrpc;

import com.lmax.solana4j.domain.Sol;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.math.BigDecimal;
Expand All @@ -20,4 +21,11 @@ void shouldRequestAirdrop()
// }
assertThat(api.requestAirdrop(payerAccount, new Sol(BigDecimal.ONE).lamports())).isNotBlank();
}

@Test
@Disabled
void shouldThrowRpcExceptionForMalformedAccount()
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.lmax.solana4j.client.jsonrpc;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.fail;

// https://solana.com/docs/rpc/http/sendtransaction
class SendTransactionContractTest extends SolanaClientIntegrationTestBase
{
@Test
@Disabled
void shouldSendTransaction()
{
final var transactionSignature = api.sendTransaction("blobWellFormed...Not");
fail();
}

@Test
@Disabled
void shouldThrowRpcExceptionForMalformedTransaction()
{
fail();
}
}

0 comments on commit 2a33563

Please sign in to comment.