public class IsValidTest extends Object
TxHandler.isValidTx(Transaction)
Test Strategy: Test 1: test isValidTx() with valid transactions Test 2: test isValidTx() with transactions containing signatures of incorrect data Test 3: test isValidTx() with transactions containing signatures using incorrect private keys Test 4: test isValidTx() with transactions whose total output value exceeds total input value Test 5: test isValidTx() with transactions that claim outputs not in the current utxoPool Test 6: test isValidTx() with transactions that claim the same UTXO multiple times Test 7: test isValidTx() with transactions that contain a negative output value
| Constructor and Description |
|---|
IsValidTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testIsValidSignaturesWithInvalidPrivateKeys() |
void |
testIsValidTotalOutputExceedsTotalInput() |
void |
testIsValidTransactionsClaimingTheSameUTXOSeveralTimes() |
void |
testIsValidTransactionsClamingOuputsNotInThePool() |
void |
testIsValidTransactionsWithNegativeOutput() |
void |
testIsValidWithInvalidSignatures() |
void |
testIsValidWithValidTransactions() |
public void testIsValidWithValidTransactions()
throws NoSuchAlgorithmException,
InvalidKeyException,
SignatureException
public void testIsValidWithInvalidSignatures()
throws NoSuchAlgorithmException,
InvalidKeyException,
SignatureException
public void testIsValidSignaturesWithInvalidPrivateKeys()
throws NoSuchAlgorithmException,
InvalidKeyException,
SignatureException
public void testIsValidTotalOutputExceedsTotalInput()
throws NoSuchAlgorithmException,
InvalidKeyException,
SignatureException
public void testIsValidTransactionsClamingOuputsNotInThePool()
throws NoSuchAlgorithmException,
InvalidKeyException,
SignatureException
public void testIsValidTransactionsClaimingTheSameUTXOSeveralTimes()
throws NoSuchAlgorithmException,
InvalidKeyException,
SignatureException
public void testIsValidTransactionsWithNegativeOutput()
throws NoSuchAlgorithmException,
InvalidKeyException,
SignatureException