Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Nc 1145 Acceptance test for getTransactionReceipt JSON-RPC method #278

Merged
merged 20 commits into from
Nov 20, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1ff064a
EthGetTransactionReceipt Acceptance test added
Shinabyss Nov 4, 2018
2146a6a
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Nov 4, 2018
ef0db70
GetTransactionReceipt Acceptance Test updated to conform to new dsl
Shinabyss Nov 4, 2018
85d70a3
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Nov 18, 2018
7c46e78
Update to new dsl
Shinabyss Nov 18, 2018
984dd7d
Update to new dsl
Shinabyss Nov 19, 2018
5f9135b
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Nov 19, 2018
a3ec974
Update to new dsl - spotless applied
Shinabyss Nov 19, 2018
4549355
Naming convention corrected
Shinabyss Nov 20, 2018
8f1193d
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Nov 20, 2018
90ffc61
Naming convention corrected
Shinabyss Nov 20, 2018
e404973
Naming convention corrected
Shinabyss Nov 20, 2018
4929caf
Merge remote-tracking branch 'origin/NC-1145' into NC-1145
Shinabyss Nov 20, 2018
1a581a4
Merge branch 'master' into NC-1145
Shinabyss Nov 20, 2018
41c6026
Naming convention corrected
Shinabyss Nov 20, 2018
b4c1054
Removed sender field to make test more efficient
Shinabyss Nov 20, 2018
e07ef34
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Nov 20, 2018
01f3339
Merge remote-tracking branch 'origin/NC-1145' into NC-1145
Shinabyss Nov 20, 2018
d0653fc
Removed sender field to make test more efficient
Shinabyss Nov 20, 2018
42beaf4
Merge branch 'master' into NC-1145
Shinabyss Nov 20, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Naming convention corrected
  • Loading branch information
Shinabyss committed Nov 20, 2018
commit 41c6026cf144140c5d67445e3ba56284dc85d586
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

import org.web3j.protocol.core.methods.response.TransactionReceipt;

public class ExpectEthGetTransactionReceiptIsPresent implements Condition {
public class ExpectSuccessfulEthGetTransactionReceipt implements Condition {

private final EthGetTransactionReceiptTransaction transaction;

public ExpectEthGetTransactionReceiptIsPresent(
public ExpectSuccessfulEthGetTransactionReceipt(
final EthGetTransactionReceiptTransaction transaction) {
this.transaction = transaction;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.Condition;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.eth.ExpectEthAccountsException;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.eth.ExpectEthGetTransactionReceiptIsAbsent;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.eth.ExpectEthGetTransactionReceiptIsPresent;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.eth.ExpectSuccessfulEthGetTransactionReceipt;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.eth.ExpectEthGetWorkException;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.eth.SanityCheckEthGetWorkValues;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.eth.EthTransactions;
Expand All @@ -41,8 +41,8 @@ public Condition accountsExceptional(final String expectedMessage) {
return new ExpectEthAccountsException(transactions.accounts(), expectedMessage);
}

public Condition expectTransactionReceipt(final Hash transactionHash) {
return new ExpectEthGetTransactionReceiptIsPresent(
public Condition expectSuccessfulTransactionReceipt(final Hash transactionHash) {
return new ExpectSuccessfulEthGetTransactionReceipt(
transactions.getTransactionReceipt(transactionHash.toString()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public EthAccountsTransaction accounts() {
return new EthAccountsTransaction();
}

public EthGetTransactionReceiptTransaction getTransactionReceipt(final String param) {
return new EthGetTransactionReceiptTransaction(param);
public EthGetTransactionReceiptTransaction getTransactionReceipt(final String transactionHash) {
return new EthGetTransactionReceiptTransaction(transactionHash);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void transactionMustHaveReceipt() {
final Hash transactionHash =
minerNode.execute(transactions.createTransfer(sender, recipient, 5));
cluster.verify(recipient.balanceEquals(5));
minerNode.verify(eth.expectTransactionReceipt(transactionHash));
minerNode.verify(eth.expectSuccessfulTransactionReceipt(transactionHash));
}

@Test
Expand Down