Skip to content

Commit

Permalink
Commented - testCreateInvalidWalletTransactionRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
marsafy1 committed May 2, 2024
1 parent 3d1df43 commit 2df2a79
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,39 @@ void testCreateValidWalletTransactionRequest() {
() -> fail("Wallet Transaction not found"));
}

// @Test
// void testCreateInvalidWalletTransactionRequest() {
// CreateWalletTransactionRequest createWalletTransactionRequest =
// CreateWalletTransactionRequest.builder()
// .withAmount(-1000)
// .withDescription("Negative Balance")
// .withFreelancerId("1") // wallet ID
// .withPaymentTransactionId("2")
// .withTransactionType(WalletTransactionType.CREDIT)
// .build();
//
// CreateWalletTransactionResponse response =
// (CreateWalletTransactionResponse)
// template.convertSendAndReceive(
// ServiceQueueNames.PAYMENTS, createWalletTransactionRequest);
//
// assertNotNull(response);
// assertEquals(HttpStatusCode.BAD_REQUEST, response.getStatusCode());
//
// walletTransactionRepository
// .findById(response.getWalletTransactionId())
// .ifPresentOrElse(
// walletTransaction -> {
// System.out.println(walletTransaction.getWalletId());
// System.out.println(walletTransaction.getId());
// assertEquals(-1000, walletTransaction.getAmount());
// assertEquals("1", walletTransaction.getWalletId());
// assertEquals("2", walletTransaction.getPaymentTransactionId());
// assertEquals(WalletTransactionType.CREDIT, walletTransaction.getTransactionType());
// },
// () -> fail("Wallet Transaction not found"));
// }

@Test
void testCreateDuplicatedWalletTransactionRequest() {
CreateWalletTransactionRequest createWalletTransactionRequest =
Expand Down

0 comments on commit 2df2a79

Please sign in to comment.