Skip to content

Commit

Permalink
test: testing customer account
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdev01 committed Dec 28, 2024
1 parent 24b3ac9 commit 32d9f2b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package integration.io.github.jpdev.asaassdk.rest.pix.customeraccount;

import integration.io.github.jpdev.asaassdk.AsaasClientMock;
import io.github.jpdev.asaassdk.rest.customeraccount.CustomerAccount;
import org.junit.jupiter.api.*;

public class CustomerAccountTest {

@BeforeAll
static void setup() {
AsaasClientMock.create();
}

@Test
@Tag("integration")
@DisplayName("Teste de criação de conta de cliente")
@Order(1)
void save() {
String name = "Teste unitário";
String cnpj = "10030823005";

CustomerAccount.fetcher("cus_000072683044").fetch();
CustomerAccount customerAccount = CustomerAccount.creator()
.setName(name)
.setCpfCnpj(cnpj)
.create();

Assertions.assertNotNull(customerAccount, "Conta de cliente não criada.");
Assertions.assertEquals(name, customerAccount.getName(), "Nome da conta de cliente incorreto.");
Assertions.assertEquals(cnpj, customerAccount.getCpfCnpj(), "CPF/CNPJ da conta de cliente incorreto.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ void creating() {

assertNotNull(qrCode, "QR Code não criado.");
assertNotNull(qrCode.expirationDate);
assertNotNull(qrCode.payload);
}
}

0 comments on commit 32d9f2b

Please sign in to comment.