use of com.hederahashgraph.api.proto.java.ScheduleGetInfoResponse in project hedera-services by hashgraph.
the class GetScheduleInfoAnswerTest method recognizesMissingInfoWhenNoCtxGiven.
@Test
void recognizesMissingInfoWhenNoCtxGiven() throws Throwable {
// setup:
Query sensibleQuery = validQuery(ANSWER_ONLY, 5L, scheduleID);
given(view.infoForSchedule(scheduleID)).willReturn(Optional.empty());
// when:
Response response = subject.responseGiven(sensibleQuery, view, OK, 0L);
// then:
ScheduleGetInfoResponse opResponse = response.getScheduleGetInfo();
assertTrue(opResponse.hasHeader(), "Missing response header!");
assertEquals(INVALID_SCHEDULE_ID, opResponse.getHeader().getNodeTransactionPrecheckCode());
}
use of com.hederahashgraph.api.proto.java.ScheduleGetInfoResponse in project hedera-services by hashgraph.
the class GetScheduleInfoAnswerTest method recognizesMissingInfoWhenCtxGiven.
@Test
void recognizesMissingInfoWhenCtxGiven() throws Throwable {
// setup:
Query sensibleQuery = validQuery(ANSWER_ONLY, 5L, scheduleID);
// when:
Response response = subject.responseGiven(sensibleQuery, view, OK, 0L, Collections.emptyMap());
// then:
ScheduleGetInfoResponse opResponse = response.getScheduleGetInfo();
assertTrue(opResponse.hasHeader(), "Missing response header!");
assertEquals(INVALID_SCHEDULE_ID, opResponse.getHeader().getNodeTransactionPrecheckCode());
verify(view, never()).infoForSchedule(any());
}
Aggregations