-
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.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...va/integration/io/github/jpdev/asaassdk/rest/pix/customeraccount/CustomerAccountTest.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,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."); | ||
} | ||
} |
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