Search in sources :

Example 1 with NetworkGetExecutionTimeResponse

use of com.hederahashgraph.api.proto.java.NetworkGetExecutionTimeResponse in project hedera-services by hashgraph.

the class GetExecTimeAnswerTest method getsCostAnswerResponse.

@Test
void getsCostAnswerResponse() throws Throwable {
    // setup:
    Query query = validQuery(COST_ANSWER, fee);
    // when:
    Response response = subject.responseGiven(query, view, OK, fee);
    // then:
    assertTrue(response.hasNetworkGetExecutionTime());
    NetworkGetExecutionTimeResponse opResponse = response.getNetworkGetExecutionTime();
    assertEquals(OK, opResponse.getHeader().getNodeTransactionPrecheckCode());
    assertEquals(COST_ANSWER, opResponse.getHeader().getResponseType());
    assertEquals(fee, opResponse.getHeader().getCost());
    assertEquals(OK, subject.checkValidity(query, view));
}
Also used : Response(com.hederahashgraph.api.proto.java.Response) NetworkGetExecutionTimeResponse(com.hederahashgraph.api.proto.java.NetworkGetExecutionTimeResponse) Query(com.hederahashgraph.api.proto.java.Query) NetworkGetExecutionTimeQuery(com.hederahashgraph.api.proto.java.NetworkGetExecutionTimeQuery) NetworkGetExecutionTimeResponse(com.hederahashgraph.api.proto.java.NetworkGetExecutionTimeResponse) Test(org.junit.jupiter.api.Test)

Aggregations

NetworkGetExecutionTimeQuery (com.hederahashgraph.api.proto.java.NetworkGetExecutionTimeQuery)1 NetworkGetExecutionTimeResponse (com.hederahashgraph.api.proto.java.NetworkGetExecutionTimeResponse)1 Query (com.hederahashgraph.api.proto.java.Query)1 Response (com.hederahashgraph.api.proto.java.Response)1 Test (org.junit.jupiter.api.Test)1