Search in sources :

Example 1 with Validator

use of com.radixdlt.api.core.openapitools.model.Validator in project radixdlt by radixdlt.

the class EngineStatusHandlerTest method engine_configuration_should_return_correct_data.

@Test
public void engine_configuration_should_return_correct_data() throws Exception {
    // Arrange
    start();
    // Act
    var request = new EngineStatusRequest().networkIdentifier(new NetworkIdentifier().network("localnet"));
    var response = handleRequestWithExpectedResponse(sut, request, EngineStatusResponse.class);
    // Assert
    assertThat(response.getValidatorSet()).containsExactly(new Validator().validatorAddress(addressing.forValidators().of(selfKey())).stake(getStakeAmount().toSubunits().toString()));
}
Also used : EngineStatusRequest(com.radixdlt.api.core.openapitools.model.EngineStatusRequest) NetworkIdentifier(com.radixdlt.api.core.openapitools.model.NetworkIdentifier) Validator(com.radixdlt.api.core.openapitools.model.Validator) ApiTest(com.radixdlt.api.ApiTest) Test(org.junit.Test)

Aggregations

ApiTest (com.radixdlt.api.ApiTest)1 EngineStatusRequest (com.radixdlt.api.core.openapitools.model.EngineStatusRequest)1 NetworkIdentifier (com.radixdlt.api.core.openapitools.model.NetworkIdentifier)1 Validator (com.radixdlt.api.core.openapitools.model.Validator)1 Test (org.junit.Test)1