Old code. fixed.

On Mar 28, 2014, at 11:12 AM, Dev Random <notifications@github.com> wrote:

> In Oracle/src/test/java/co/digitaloracle/ApiResponseTest.java:
> 
> > +    }
> > +
> > +    @Test
> > +    public void testKeychainParams() throws Exception {
> > +        String string = "{\"walletAgent\": \"HDM-2.0-cc-100\", \"rulesetId\":\"default\",\"keys\":[\"xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH\",\"xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH\"],\"parameters\":{\"velocity_1\":{\"value\":200,\"asset\":\"BTC\",\"period\":86400,\"limited_keys\":[0]},\"delay_1\":60},\"pii\":{\"email\":\"email@email.em\",\"phone\":\"+1 415-415-4155\"}}";
> > +        ObjectMapper objectMapper = new ObjectMapper();
> > +        objectMapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
> > +        KeychainParams kp = objectMapper.readValue(string, KeychainParams.class);
> > +        assertEquals("rulesetId", "default", kp.getRulesetId());
> > +        assertEquals("keys", 2, kp.getKeys().size());
> > +    }
> > +
> > +    @Test
> > +    public void testSignTxResponse() throws JsonParseException, JsonMappingException, IOException {
> > +        File f = new File( "./");
> > +        String x = f.getAbsolutePath();
> You don't need f. You can just call new File(rootPath). Also, no need to absolutize.
> 
> —
> Reply to this email directly or view it on GitHub.
>