Search in sources :

Example 1 with TransactionFees

use of io.nem.symbol.sdk.model.network.TransactionFees in project nem2-sdk-java by nemtech.

the class NetworkRepositoryIntegrationTest method getTransactionFees.

@ParameterizedTest
@EnumSource(RepositoryType.class)
void getTransactionFees(RepositoryType type) {
    TransactionFees transactionFees = get(getNetworkRepository(type).getTransactionFees());
    Assertions.assertNotNull(transactionFees.getAverageFeeMultiplier());
    Assertions.assertNotNull(transactionFees.getHighestFeeMultiplier());
    Assertions.assertNotNull(transactionFees.getLowestFeeMultiplier());
    Assertions.assertNotNull(transactionFees.getMedianFeeMultiplier());
    System.out.println(jsonHelper().prettyPrint(transactionFees));
}
Also used : TransactionFees(io.nem.symbol.sdk.model.network.TransactionFees) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 2 with TransactionFees

use of io.nem.symbol.sdk.model.network.TransactionFees in project nem2-sdk-java by nemtech.

the class NetworkRepositoryVertxImplTest method getTransactionFees.

@Test
void getTransactionFees() throws Exception {
    TransactionFeesDTO dto = new TransactionFeesDTO();
    dto.setAverageFeeMultiplier(1L);
    dto.setMedianFeeMultiplier(2L);
    dto.setLowestFeeMultiplier(3L);
    dto.setHighestFeeMultiplier(4L);
    mockRemoteCall(dto);
    TransactionFees info = repository.getTransactionFees().toFuture().get();
    Assertions.assertNotNull(info);
    Assertions.assertEquals(dto.getAverageFeeMultiplier(), info.getAverageFeeMultiplier());
    Assertions.assertEquals(dto.getMedianFeeMultiplier(), info.getMedianFeeMultiplier());
    Assertions.assertEquals(dto.getLowestFeeMultiplier(), info.getLowestFeeMultiplier());
    Assertions.assertEquals(dto.getHighestFeeMultiplier(), info.getHighestFeeMultiplier());
}
Also used : TransactionFeesDTO(io.nem.symbol.sdk.openapi.vertx.model.TransactionFeesDTO) TransactionFees(io.nem.symbol.sdk.model.network.TransactionFees) Test(org.junit.jupiter.api.Test)

Example 3 with TransactionFees

use of io.nem.symbol.sdk.model.network.TransactionFees in project nem2-sdk-java by nemtech.

the class NetworkRepositoryOkHttpImplTest method getTransactionFees.

@Test
void getTransactionFees() throws Exception {
    TransactionFeesDTO dto = new TransactionFeesDTO();
    dto.setAverageFeeMultiplier(1L);
    dto.setMedianFeeMultiplier(2L);
    dto.setLowestFeeMultiplier(3L);
    dto.setHighestFeeMultiplier(4L);
    mockRemoteCall(dto);
    TransactionFees info = repository.getTransactionFees().toFuture().get();
    Assertions.assertNotNull(info);
    Assertions.assertEquals(dto.getAverageFeeMultiplier(), info.getAverageFeeMultiplier());
    Assertions.assertEquals(dto.getMedianFeeMultiplier(), info.getMedianFeeMultiplier());
    Assertions.assertEquals(dto.getLowestFeeMultiplier(), info.getLowestFeeMultiplier());
    Assertions.assertEquals(dto.getHighestFeeMultiplier(), info.getHighestFeeMultiplier());
}
Also used : TransactionFeesDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionFeesDTO) TransactionFees(io.nem.symbol.sdk.model.network.TransactionFees) Test(org.junit.jupiter.api.Test)

Aggregations

TransactionFees (io.nem.symbol.sdk.model.network.TransactionFees)3 Test (org.junit.jupiter.api.Test)2 TransactionFeesDTO (io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionFeesDTO)1 TransactionFeesDTO (io.nem.symbol.sdk.openapi.vertx.model.TransactionFeesDTO)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 EnumSource (org.junit.jupiter.params.provider.EnumSource)1