use of org.ethereum.util.RskTestContext in project rskj by rsksmart.
the class PreflightChecksUtilsTest method runChecks_currentJavaVersionIs1dot8_OK.
@Test
public void runChecks_currentJavaVersionIs1dot8_OK() throws Exception {
RskContext rskContext = new RskTestContext(new String[0]);
PreflightChecksUtils preflightChecksUtilsSpy = spy(new PreflightChecksUtils(rskContext));
when(preflightChecksUtilsSpy.getJavaVersion()).thenReturn("1.8");
preflightChecksUtilsSpy.runChecks();
verify(preflightChecksUtilsSpy, times(1)).getJavaVersion();
verify(preflightChecksUtilsSpy, times(1)).getIntJavaVersion("1.8");
rskContext.close();
}
use of org.ethereum.util.RskTestContext in project rskj by rsksmart.
the class PreflightChecksUtilsTest method runChecks_runAllChecks_OK.
@Test
public void runChecks_runAllChecks_OK() throws Exception {
RskContext rskContext = new RskTestContext(new String[0]);
PreflightChecksUtils preflightChecksUtilsSpy = spy(new PreflightChecksUtils(rskContext));
when(preflightChecksUtilsSpy.getJavaVersion()).thenReturn("1.8.0_275");
preflightChecksUtilsSpy.runChecks();
verify(preflightChecksUtilsSpy, times(1)).getJavaVersion();
verify(preflightChecksUtilsSpy, times(1)).getIntJavaVersion("1.8.0_275");
verify(preflightChecksUtilsSpy, times(1)).checkSupportedJavaVersion();
rskContext.close();
}
use of org.ethereum.util.RskTestContext in project rskj by rsksmart.
the class PreflightChecksUtilsTest method getIntJavaVersion_OK.
@Test
public void getIntJavaVersion_OK() {
RskContext rskContext = new RskTestContext(new String[0]);
PreflightChecksUtils preflightChecksUtils = new PreflightChecksUtils(rskContext);
assertEquals(preflightChecksUtils.getIntJavaVersion("1.8.0_275"), 8);
assertEquals(preflightChecksUtils.getIntJavaVersion("1.8.0_72-ea"), 8);
assertEquals(preflightChecksUtils.getIntJavaVersion("11.8.0_71-ea"), 11);
assertEquals(preflightChecksUtils.getIntJavaVersion("11.0"), 11);
assertEquals(preflightChecksUtils.getIntJavaVersion("9"), 9);
assertEquals(preflightChecksUtils.getIntJavaVersion("11"), 11);
assertEquals(preflightChecksUtils.getIntJavaVersion("333"), 333);
assertEquals(preflightChecksUtils.getIntJavaVersion("9-ea"), 9);
rskContext.close();
}
use of org.ethereum.util.RskTestContext in project rskj by rsksmart.
the class NodeRunnerSmokeTest method regtestSmokeTest.
@Test
public void regtestSmokeTest() {
RskTestContext rskContext = new RskTestContext(new String[] { "--regtest" });
assertThat(rskContext.getNodeRunner(), notNullValue());
rskContext.close();
}
use of org.ethereum.util.RskTestContext in project rskj by rsksmart.
the class NodeRunnerSmokeTest method mainnetSmokeTest.
@Test
public void mainnetSmokeTest() {
RskTestContext rskContext = new RskTestContext(new String[0]);
assertThat(rskContext.getNodeRunner(), notNullValue());
rskContext.close();
}
Aggregations