Package com.dyuproject.json.test

Examples of com.dyuproject.json.test.OverloadTask


        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);
       
        OverloadTask otask1 = (OverloadTask)map.get("overload_task1");
        assertTrue(otask1!=null);
        assertTrue(otask1.getStatus()==null);
        assertTrue(otask1.getStatusPojo()!=null);
        assertTrue("7.5".equals(otask1.getStatusPojo().getId()));
    }
View Full Code Here


    {
        assertTrue(tasks!=null && tasks.size()==3);
        assertTrue("10".equals(tasks.get(0).getStatus()));
        assertTrue(tasks.get(1) instanceof OverloadTask);
        assertTrue(tasks.get(2) instanceof OverloadTask);
        OverloadTask otask = (OverloadTask)tasks.get(1);
        OverloadTask otask1 = (OverloadTask)tasks.get(2);
        assertTrue(otask.getStatusInt()==5);
        assertTrue(otask1.getStatusPojo()!=null);
        assertTrue("7.5".equals(otask1.getStatusPojo().getId()));
    }
View Full Code Here

        assertTrue(tasks!=null && tasks.size()==3);
        for(Task t : tasks)
        {
            if(t instanceof OverloadTask)
            {
                OverloadTask otask = (OverloadTask)t;
                if(otask.getStatusInt()!=0)
                {
                    assertTrue(otask.getStatusInt()==5);
                }
                else
                {
                    assertTrue(otask.getStatusPojo()!=null);
                    assertTrue("7.5".equals(otask.getStatusPojo().getId()));
                }
            }
            else
            {
                assertTrue("10".equals(t.getStatus()));
View Full Code Here

TOP

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

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.