implemented getTrytes command request

This commit is contained in:
davassi
2016-10-07 15:24:27 +02:00
parent 117694cdc2
commit 53067530f8
9 changed files with 109 additions and 28 deletions
+26 -3
View File
@@ -14,6 +14,11 @@ import org.junit.Test;
*/
public class IotaAPIProxyTest {
private static final String TEST_SEED = "AAA999999999999999999999999999999999999999999999999999999999999999999999999999999";
private static final String TEST_TRANSACTION = "ZJVYUGTDRPDYFGFXMKOTV9ZWSGFK9CFPXTITQLQNLPPG9YNAARMKNKYQO9GSCSBIOTGMLJUFLZWSY9999";
private static final String TEST_HASH = "OAATQS9VQLSXCLDJVJJVYUGONXAXOFMJOZNSYWRZSWECMXAQQURHQBJNLD9IOFEPGZEPEMPXCIVRX9999";
private static final Integer TEST_MILESTONE_INDEX = 8059;
private IotaAPIProxy proxy;
@Before
@@ -40,7 +45,7 @@ public class IotaAPIProxyTest {
@Test
public void shouldGetMilestone() {
GetMilestoneResponse milestone = proxy.getMilestone(1000);
GetMilestoneResponse milestone = proxy.getMilestone(TEST_MILESTONE_INDEX);
assertThat(milestone, IsNull.notNullValue());
}
@@ -58,7 +63,7 @@ public class IotaAPIProxyTest {
@Test
public void shouldFindTransactionsByAddresses() {
FindTransactionResponse trans = proxy.findTransactionsByAddresses(new String[]{"123ABC"});
FindTransactionResponse trans = proxy.findTransactionsByAddresses(TEST_TRANSACTION);
assertThat(trans, IsNull.notNullValue());
}
@@ -80,10 +85,28 @@ public class IotaAPIProxyTest {
assertThat(trans, IsNull.notNullValue());
}
@Test
public void shouldGetTransactions() {
GetTransfersResponse res = proxy.getTransfers(TEST_SEED, 1);
assertThat(res, IsNull.notNullValue());
}
@Test
public void shouldGetInclusionStates() {
GetInclusionStateResponse res = proxy.getInclusionStates(new String[]{"123ABC"},
GetInclusionStateResponse res = proxy.getInclusionStates(new String[]{TEST_TRANSACTION},
new String[]{"123"});
assertThat(res, IsNull.notNullValue());
}
@Test
public void shouldGetBundle() {
GetBundleResponse res = proxy.getBundle(TEST_TRANSACTION);
assertThat(res, IsNull.notNullValue());
}
@Test
public void shouldGetTrytes() {
GetTrytesResponse res = proxy.getTrytes(TEST_HASH);
assertThat(res, IsNull.notNullValue());
}
}