Search in sources :

Example 1 with MultisigAccountInfoDTO

use of io.nem.symbol.sdk.openapi.okhttp_gson.model.MultisigAccountInfoDTO in project nem2-sdk-java by nemtech.

the class MultisigRepositoryOkHttpImplTest method getMultisigAccountInfo.

@Test
void getMultisigAccountInfo() throws Exception {
    MultisigAccountInfoDTO dto = createMultisigAccountInfoDTO();
    mockRemoteCall(dto);
    MultisigAccountInfo multisigAccountInfo = repository.getMultisigAccountInfo(account.getAddress()).toFuture().get();
    assertMultisignAccountInfo(multisigAccountInfo);
}
Also used : MultisigAccountInfo(io.nem.symbol.sdk.model.account.MultisigAccountInfo) MultisigAccountInfoDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.MultisigAccountInfoDTO) Test(org.junit.jupiter.api.Test)

Example 2 with MultisigAccountInfoDTO

use of io.nem.symbol.sdk.openapi.okhttp_gson.model.MultisigAccountInfoDTO in project nem2-sdk-java by nemtech.

the class MultisigRepositoryOkHttpImplTest method createMultisigAccountInfoDTO.

private MultisigAccountInfoDTO createMultisigAccountInfoDTO() {
    MultisigAccountInfoDTO dto = new MultisigAccountInfoDTO();
    MultisigDTO multisigDto = new MultisigDTO();
    multisigDto.setVersion(1);
    multisigDto.setAccountAddress(account.getAddress().encoded());
    multisigDto.setMinApproval(1L);
    multisigDto.setMinRemoval(2L);
    multisigDto.setCosignatoryAddresses(Arrays.asList(account1.getAddress().encoded(), account2.getAddress().encoded()));
    multisigDto.setMultisigAddresses(Arrays.asList(account2.getAddress().encoded(), account3.getAddress().encoded()));
    dto.setMultisig(multisigDto);
    return dto;
}
Also used : MultisigDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.MultisigDTO) MultisigAccountInfoDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.MultisigAccountInfoDTO)

Aggregations

MultisigAccountInfoDTO (io.nem.symbol.sdk.openapi.okhttp_gson.model.MultisigAccountInfoDTO)2 MultisigAccountInfo (io.nem.symbol.sdk.model.account.MultisigAccountInfo)1 MultisigDTO (io.nem.symbol.sdk.openapi.okhttp_gson.model.MultisigDTO)1 Test (org.junit.jupiter.api.Test)1