updated tests

This commit is contained in:
pinpong
2016-12-09 19:42:11 +01:00
parent 605703b387
commit e0a56e6359
+11 -1
View File
@@ -3,6 +3,9 @@ package jota;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import jota.dto.response.*;
import jota.error.ArgumentException;
import jota.error.NotEnoughBalanceException;
import jota.model.Inputs;
import org.hamcrest.core.Is;
import org.hamcrest.core.IsNull;
import org.junit.Before;
@@ -11,6 +14,7 @@ import org.junit.Test;
import java.util.Collections;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
/**
* Let's do some integration test coverage against a default local real node.
@@ -129,6 +133,12 @@ public class IotaAPIProxyTest {
@Test
public void shouldCreateANewAddress() {
final GetNewAddressResponse res = proxy.getNewAddress(TEST_SEED, 0, false, 1, false);
assertThat(res.getAddress(), Is.is(Collections.singletonList(TEST_ADDRESS_WITHOUT_CHECKSUM)));
assertThat(res.getAddresses(), Is.is(Collections.singletonList(TEST_ADDRESS_WITHOUT_CHECKSUM)));
}
@Test
public void shouldGetGetInputs() throws ArgumentException, NotEnoughBalanceException {
final Inputs res = proxy.getInputs(TEST_SEED, 0, 1, 1);
assertTrue(res.getTotalBalance() > 0);
}
}