Package com.dyuproject.json.test

Examples of com.dyuproject.json.test.Task


        String resource = "src/test/resources/com/dyuproject/json/test/overload_task.json";
        StandardJSON json = new StandardJSON(new OverloadConvertorCache());
        File file = new File(resource);
        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
        Map<String,Object> map = (Map<String,Object>)json.parse(new ReaderSource(reader));
        Task task = (Task)map.get("task");
        assertTrue(task!=null);
        assertTrue("10".equals(task.getStatus()));
       
        OverloadTask otask = (OverloadTask)map.get("overload_task");
        assertTrue(otask!=null);
        assertTrue(otask.getStatus()==null);
        assertTrue(otask.getStatusInt()==5);
View Full Code Here

TOP

Related Classes of com.dyuproject.json.test.Task

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.