forked from bisq-network/bisq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Returns a list of supported payment method IDs. This gives CLI users the correct payment method id for creating a new payment account. - Added gRPC service GetPaymentMethods to grpc.proto. - Added gRPC boilerplate method to GrpcPaymentAccountsService. - Added implimentation to CoreApi -> CorePaymentAccountsService. - Refactored PaymentAccountTest hierarchy. - Add api method to CLI.
- Loading branch information
Showing
10 changed files
with
169 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
apitest/src/test/java/bisq/apitest/method/payment/GetPaymentMethodsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package bisq.apitest.method.payment; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
|
||
import org.junit.jupiter.api.AfterAll; | ||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Disabled; | ||
import org.junit.jupiter.api.MethodOrderer; | ||
import org.junit.jupiter.api.Order; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.TestMethodOrder; | ||
|
||
import static bisq.apitest.Scaffold.BitcoinCoreApp.bitcoind; | ||
import static bisq.apitest.config.BisqAppConfig.alicedaemon; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
import static org.junit.jupiter.api.Assertions.fail; | ||
|
||
|
||
|
||
import bisq.apitest.method.MethodTest; | ||
|
||
@Disabled | ||
@Slf4j | ||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class) | ||
public class GetPaymentMethodsTest extends MethodTest { | ||
|
||
@BeforeAll | ||
public static void setUp() { | ||
try { | ||
setUpScaffold(bitcoind, alicedaemon); | ||
} catch (Exception ex) { | ||
fail(ex); | ||
} | ||
} | ||
|
||
@Test | ||
@Order(1) | ||
public void testGetPaymentMethods() { | ||
List<String> paymentMethodIds = getPaymentMethods(alicedaemon) | ||
.stream() | ||
.map(p -> p.getId()) | ||
.collect(Collectors.toList()); | ||
assertTrue(paymentMethodIds.size() > 25); | ||
} | ||
|
||
@AfterAll | ||
public static void tearDown() { | ||
tearDownScaffold(); | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
apitest/src/test/java/bisq/apitest/scenario/PaymentAccountTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package bisq.apitest.scenario; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
|
||
import org.junit.jupiter.api.AfterAll; | ||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.MethodOrderer; | ||
import org.junit.jupiter.api.Order; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.TestMethodOrder; | ||
|
||
import static bisq.apitest.Scaffold.BitcoinCoreApp.bitcoind; | ||
import static bisq.apitest.config.BisqAppConfig.alicedaemon; | ||
import static bisq.apitest.config.BisqAppConfig.arbdaemon; | ||
import static bisq.apitest.config.BisqAppConfig.seednode; | ||
import static org.junit.jupiter.api.Assertions.fail; | ||
|
||
|
||
|
||
import bisq.apitest.method.MethodTest; | ||
import bisq.apitest.method.payment.CreatePaymentAccountTest; | ||
import bisq.apitest.method.payment.GetPaymentMethodsTest; | ||
|
||
@Slf4j | ||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class) | ||
public class PaymentAccountTest extends MethodTest { | ||
|
||
@BeforeAll | ||
public static void setUp() { | ||
try { | ||
setUpScaffold(bitcoind, seednode, arbdaemon, alicedaemon); | ||
} catch (Exception ex) { | ||
fail(ex); | ||
} | ||
} | ||
|
||
@Test | ||
@Order(1) | ||
public void testGetPaymentMethods() { | ||
GetPaymentMethodsTest test = new GetPaymentMethodsTest(); | ||
test.testGetPaymentMethods(); | ||
} | ||
|
||
@Test | ||
@Order(2) | ||
public void testCreatePaymentAccount() { | ||
CreatePaymentAccountTest test = new CreatePaymentAccountTest(); | ||
test.testCreatePerfectMoneyUSDPaymentAccount(); | ||
} | ||
|
||
@AfterAll | ||
public static void tearDown() { | ||
tearDownScaffold(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters