use of com.hedera.mirror.api.proto.AddressBookQuery in project hedera-mirror-node by hashgraph.
the class NetworkControllerTest method missingFileId.
@Test
void missingFileId() {
AddressBookQuery query = AddressBookQuery.newBuilder().build();
reactiveService.getNodes(Mono.just(query)).as(StepVerifier::create).expectErrorSatisfies(t -> assertException(t, Status.Code.INVALID_ARGUMENT, "fileId: must not be null")).verify(Duration.ofSeconds(1L));
}
use of com.hedera.mirror.api.proto.AddressBookQuery in project hedera-mirror-node by hashgraph.
the class NetworkControllerTest method noLimit.
@Test
void noLimit() {
AddressBook addressBook = addressBook();
AddressBookEntry addressBookEntry1 = addressBookEntry();
AddressBookEntry addressBookEntry2 = addressBookEntry();
AddressBookQuery query = AddressBookQuery.newBuilder().setFileId(FileID.newBuilder().setFileNum(addressBook.getFileId().getEntityNum()).build()).build();
reactiveService.getNodes(Mono.just(query)).as(StepVerifier::create).thenAwait(Duration.ofMillis(50)).consumeNextWith(n -> assertEntry(addressBookEntry1, n)).consumeNextWith(n -> assertEntry(addressBookEntry2, n)).expectComplete().verify(Duration.ofSeconds(1L));
}
Aggregations