Search in sources :

Example 1 with ConstructionDeriveRequestMetadataValidatorSystem

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

the class ConstructionDeriveHandlerTest method derive_validator_system_should_return_entity_identifier.

@Test
public void derive_validator_system_should_return_entity_identifier() throws CoreApiException {
    // Arrange
    var publicKey = PrivateKeys.ofNumeric(2).getPublicKey();
    start();
    // Act
    var request = new ConstructionDeriveRequest().networkIdentifier(networkIdentifier()).publicKey(coreModelMapper.publicKey(publicKey)).metadata(new ConstructionDeriveRequestMetadataValidatorSystem().type("ValidatorSystem"));
    var response = sut.handleRequest(request);
    // Assert
    assertThat(response.getEntityIdentifier()).isEqualTo(coreModelMapper.entityIdentifierValidatorSystem(publicKey));
}
Also used : ConstructionDeriveRequestMetadataValidatorSystem(com.radixdlt.api.core.openapitools.model.ConstructionDeriveRequestMetadataValidatorSystem) ConstructionDeriveRequest(com.radixdlt.api.core.openapitools.model.ConstructionDeriveRequest) ApiTest(com.radixdlt.api.ApiTest) Test(org.junit.Test)

Aggregations

ApiTest (com.radixdlt.api.ApiTest)1 ConstructionDeriveRequest (com.radixdlt.api.core.openapitools.model.ConstructionDeriveRequest)1 ConstructionDeriveRequestMetadataValidatorSystem (com.radixdlt.api.core.openapitools.model.ConstructionDeriveRequestMetadataValidatorSystem)1 Test (org.junit.Test)1