use of com.hedera.services.config.MockAccountNumbers in project hedera-services by hashgraph.
the class TxnAwareRatesManagerTest method setup.
@BeforeEach
private void setup() {
attr = new HFileMeta(false, new JContractIDKey(1, 2, 3), Instant.now().getEpochSecond());
PlatformTxnAccessor accessor = mock(PlatformTxnAccessor.class);
given(accessor.getSignedTxnWrapper()).willReturn(Transaction.getDefaultInstance());
txnCtx = mock(TransactionContext.class);
given(txnCtx.accessor()).willReturn(accessor);
midnightRates = mock(ExchangeRates.class);
postUpdateCb = mock(Consumer.class);
intradayLimit = mock(BiPredicate.class);
intradayLimitFactory = mock(IntFunction.class);
given(intradayLimitFactory.apply(actualLimit)).willReturn(intradayLimit);
properties = mock(GlobalDynamicProperties.class);
given(properties.ratesIntradayChangeLimitPercent()).willReturn(actualLimit);
subject = new TxnAwareRatesManager(new MockFileNumbers(), new MockAccountNumbers(), properties, txnCtx, () -> midnightRates, postUpdateCb, intradayLimitFactory);
}
Aggregations