Search in sources :

Example 1 with MultisigAccountGraphInfoDTO

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

the class MultisigRepositoryVertxImplTest method getMultisigAccountGraphInfo.

@Test
void getMultisigAccountGraphInfo() throws Exception {
    MultisigAccountGraphInfoDTO dto = new MultisigAccountGraphInfoDTO();
    dto.setLevel(10);
    dto.setMultisigEntries(new ArrayList<>());
    dto.getMultisigEntries().add(createMultisigAccountInfoDTO());
    List<MultisigAccountGraphInfoDTO> dtos = new ArrayList<>();
    dtos.add(dto);
    mockRemoteCall(dtos);
    MultisigAccountGraphInfo multisigAccountInfo = repository.getMultisigAccountGraphInfo(account.getAddress()).toFuture().get();
    Assertions.assertEquals(1, multisigAccountInfo.getMultisigEntries().size());
    List<MultisigAccountInfo> multisigAccountInfos = multisigAccountInfo.getMultisigEntries().get(10);
    Assertions.assertEquals(1, multisigAccountInfos.size());
    assertMultisignAccountInfo(multisigAccountInfos.get(0));
}
Also used : MultisigAccountGraphInfo(io.nem.symbol.sdk.model.account.MultisigAccountGraphInfo) ArrayList(java.util.ArrayList) MultisigAccountInfo(io.nem.symbol.sdk.model.account.MultisigAccountInfo) MultisigAccountGraphInfoDTO(io.nem.symbol.sdk.openapi.vertx.model.MultisigAccountGraphInfoDTO) Test(org.junit.jupiter.api.Test)

Aggregations

MultisigAccountGraphInfo (io.nem.symbol.sdk.model.account.MultisigAccountGraphInfo)1 MultisigAccountInfo (io.nem.symbol.sdk.model.account.MultisigAccountInfo)1 MultisigAccountGraphInfoDTO (io.nem.symbol.sdk.openapi.vertx.model.MultisigAccountGraphInfoDTO)1 ArrayList (java.util.ArrayList)1 Test (org.junit.jupiter.api.Test)1