Search in sources :

Example 1 with CryptoTestCase

use of org.ethereum.jsontestsuite.CryptoTestCase in project rskj by rsksmart.

the class LocalCryptoTest method testAllInCryptoSute.

@Test
public void testAllInCryptoSute() throws ParseException, IOException {
    String json = getJSON("crypto");
    ObjectMapper mapper = new ObjectMapper();
    JavaType type = mapper.getTypeFactory().constructMapType(HashMap.class, String.class, CryptoTestCase.class);
    HashMap<String, CryptoTestCase> testSuite = mapper.readValue(json, type);
    for (String key : testSuite.keySet()) {
        System.out.println("executing: " + key);
        testSuite.get(key).execute();
    }
}
Also used : JavaType(com.fasterxml.jackson.databind.JavaType) CryptoTestCase(org.ethereum.jsontestsuite.CryptoTestCase) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.Test)

Aggregations

JavaType (com.fasterxml.jackson.databind.JavaType)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 CryptoTestCase (org.ethereum.jsontestsuite.CryptoTestCase)1 Test (org.junit.Test)1