Search in sources :

Example 16 with RskTestContext

use of org.ethereum.util.RskTestContext in project rskj by rsksmart.

the class PreflightChecksUtilsTest method runChecks_currentJavaVersionIs11_OK.

@Test
public void runChecks_currentJavaVersionIs11_OK() throws Exception {
    RskContext rskContext = new RskTestContext(new String[0]);
    PreflightChecksUtils preflightChecksUtilsSpy = spy(new PreflightChecksUtils(rskContext));
    when(preflightChecksUtilsSpy.getJavaVersion()).thenReturn("11");
    preflightChecksUtilsSpy.runChecks();
    verify(preflightChecksUtilsSpy, times(1)).getJavaVersion();
    verify(preflightChecksUtilsSpy, times(1)).getIntJavaVersion("11");
    rskContext.close();
}
Also used : RskTestContext(org.ethereum.util.RskTestContext) RskContext(co.rsk.RskContext) Test(org.junit.Test)

Aggregations

RskTestContext (org.ethereum.util.RskTestContext)16 Test (org.junit.Test)13 RskContext (co.rsk.RskContext)8 Before (org.junit.Before)3 TestGenesisLoader (co.rsk.core.genesis.TestGenesisLoader)2 Keccak256 (co.rsk.crypto.Keccak256)2 Genesis (org.ethereum.core.Genesis)2 GenesisLoader (org.ethereum.core.genesis.GenesisLoader)2 RskSystemProperties (co.rsk.config.RskSystemProperties)1 RepositoryLocator (co.rsk.db.RepositoryLocator)1 BlockValidator (co.rsk.validators.BlockValidator)1 ActivationConfig (org.ethereum.config.blockchain.upgrades.ActivationConfig)1 BlockStore (org.ethereum.db.BlockStore)1