fix tests

This commit is contained in:
m2049r 2022-03-10 07:53:52 +01:00
parent cdb29bbc2e
commit 197dffeae1
No known key found for this signature in database
GPG Key ID: 4386E69AF260078D
4 changed files with 12 additions and 12 deletions

View File

@ -106,7 +106,7 @@ public class SideShiftApiCreateOrderTest {
@Test @Test
public void createOrder_wasSuccessfulShouldRespondWithOrder() public void createOrder_wasSuccessfulShouldRespondWithOrder()
throws TimeoutException { throws TimeoutException, InterruptedException {
final double btcAmount = 1.23456789; final double btcAmount = 1.23456789;
final String btcAddress = "19y91nJyzXsLEuR7Nj9pc3o5SeHNc8A9RW"; final String btcAddress = "19y91nJyzXsLEuR7Nj9pc3o5SeHNc8A9RW";
final double xmrAmount = 0.6; final double xmrAmount = 0.6;
@ -136,7 +136,7 @@ public class SideShiftApiCreateOrderTest {
@Test @Test
public void createOrder_wasNotSuccessfulShouldCallOnError() public void createOrder_wasNotSuccessfulShouldCallOnError()
throws TimeoutException { throws TimeoutException, InterruptedException {
mockWebServer.enqueue(new MockResponse().setResponseCode(500)); mockWebServer.enqueue(new MockResponse().setResponseCode(500));
xmrToApi.createOrder("01234567-89ab-cdef-0123-456789abcdef", "19y91nJyzXsLEuR7Nj9pc3o5SeHNc8A9RW", new ShiftCallback<CreateOrder>() { xmrToApi.createOrder("01234567-89ab-cdef-0123-456789abcdef", "19y91nJyzXsLEuR7Nj9pc3o5SeHNc8A9RW", new ShiftCallback<CreateOrder>() {
@Override @Override
@ -158,7 +158,7 @@ public class SideShiftApiCreateOrderTest {
@Test @Test
public void createOrder_malformedAddressShouldCallOnError() public void createOrder_malformedAddressShouldCallOnError()
throws TimeoutException { throws TimeoutException, InterruptedException {
mockWebServer.enqueue(new MockResponse(). mockWebServer.enqueue(new MockResponse().
setResponseCode(500). setResponseCode(500).
setBody("{\"error\":{\"message\":\"Invalid settleDestination\"}}")); setBody("{\"error\":{\"message\":\"Invalid settleDestination\"}}"));

View File

@ -80,7 +80,7 @@ public class SideShiftApiOrderParameterTest {
@Test @Test
public void orderParameter_wasSuccessfulShouldRespondWithParameters() public void orderParameter_wasSuccessfulShouldRespondWithParameters()
throws TimeoutException { throws TimeoutException, InterruptedException {
final double rate = 0.015537; final double rate = 0.015537;
final double upperLimit = 20.0; final double upperLimit = 20.0;
final double lowerLimit = 0.001; final double lowerLimit = 0.001;
@ -109,7 +109,7 @@ public class SideShiftApiOrderParameterTest {
@Test @Test
public void orderParameter_wasNotSuccessfulShouldCallOnError() public void orderParameter_wasNotSuccessfulShouldCallOnError()
throws TimeoutException { throws TimeoutException, InterruptedException {
mockWebServer.enqueue(new MockResponse().setResponseCode(500)); mockWebServer.enqueue(new MockResponse().setResponseCode(500));
xmrToApi.queryOrderParameters(new ShiftCallback<QueryOrderParameters>() { xmrToApi.queryOrderParameters(new ShiftCallback<QueryOrderParameters>() {
@Override @Override
@ -131,7 +131,7 @@ public class SideShiftApiOrderParameterTest {
@Test @Test
public void orderParameter_SettleMethodInvalidShouldCallOnError() public void orderParameter_SettleMethodInvalidShouldCallOnError()
throws TimeoutException { throws TimeoutException, InterruptedException {
mockWebServer.enqueue(new MockResponse(). mockWebServer.enqueue(new MockResponse().
setResponseCode(500). setResponseCode(500).
setBody("{\"error\":{\"message\":\"Settle method not found\"}}")); setBody("{\"error\":{\"message\":\"Settle method not found\"}}"));

View File

@ -79,7 +79,7 @@ public class SideShiftApiQueryOrderStatusTest {
@Test @Test
public void orderStatus_wasSuccessfulShouldRespondWithOrder() public void orderStatus_wasSuccessfulShouldRespondWithOrder()
throws TimeoutException { throws TimeoutException, InterruptedException {
final String state = "settled"; final String state = "settled";
final String orderId = "09090909090909090911"; final String orderId = "09090909090909090911";
@ -109,7 +109,7 @@ public class SideShiftApiQueryOrderStatusTest {
@Test @Test
public void orderStatus_wasNotSuccessfulShouldCallOnError() public void orderStatus_wasNotSuccessfulShouldCallOnError()
throws TimeoutException { throws TimeoutException, InterruptedException {
mockWebServer.enqueue(new MockResponse().setResponseCode(500)); mockWebServer.enqueue(new MockResponse().setResponseCode(500));
xmrToApi.queryOrderStatus("09090909090909090911", new ShiftCallback<QueryOrderStatus>() { xmrToApi.queryOrderStatus("09090909090909090911", new ShiftCallback<QueryOrderStatus>() {
@Override @Override
@ -131,7 +131,7 @@ public class SideShiftApiQueryOrderStatusTest {
@Test @Test
public void orderStatus_orderNotFoundShouldCallOnError() public void orderStatus_orderNotFoundShouldCallOnError()
throws TimeoutException { throws TimeoutException, InterruptedException {
mockWebServer.enqueue(new MockResponse(). mockWebServer.enqueue(new MockResponse().
setResponseCode(500). setResponseCode(500).
setBody("{\"error\":{\"message\":\"Order not found\"}}")); setBody("{\"error\":{\"message\":\"Order not found\"}}"));

View File

@ -105,7 +105,7 @@ public class SideShiftApiRequestQuoteTest {
@Test @Test
public void requestQuote_wasSuccessfulShouldRespondWithQuote() public void requestQuote_wasSuccessfulShouldRespondWithQuote()
throws TimeoutException { throws TimeoutException, InterruptedException {
final double btcAmount = 1.01; final double btcAmount = 1.01;
final double rate = 0.00397838; final double rate = 0.00397838;
final String uuid = "66fc0749-f320-4361-b0fb-7873576cba67"; final String uuid = "66fc0749-f320-4361-b0fb-7873576cba67";
@ -133,7 +133,7 @@ public class SideShiftApiRequestQuoteTest {
@Test @Test
public void requestQuote_wasNotSuccessfulShouldCallOnError() public void requestQuote_wasNotSuccessfulShouldCallOnError()
throws TimeoutException { throws TimeoutException, InterruptedException {
mockWebServer.enqueue(new MockResponse().setResponseCode(500)); mockWebServer.enqueue(new MockResponse().setResponseCode(500));
xmrToApi.requestQuote(1.01, new ShiftCallback<RequestQuote>() { xmrToApi.requestQuote(1.01, new ShiftCallback<RequestQuote>() {
@Override @Override
@ -155,7 +155,7 @@ public class SideShiftApiRequestQuoteTest {
@Test @Test
public void requestQuote_AmountTooHighShouldCallOnError() public void requestQuote_AmountTooHighShouldCallOnError()
throws TimeoutException { throws TimeoutException, InterruptedException {
mockWebServer.enqueue(new MockResponse(). mockWebServer.enqueue(new MockResponse().
setResponseCode(500). setResponseCode(500).
setBody("{\"error\":{\"message\":\"Amount too high\"}}")); setBody("{\"error\":{\"message\":\"Amount too high\"}}"));