Package org.jbpm.process.workitem.rest

Examples of org.jbpm.process.workitem.rest.RestGeoCodeApiCallWorkItemHandler


    public void testEmpty() {
    }
   
    public void FIXMEtestYahooGeoCode() throws Exception {
        RestGeoCodeApiCallWorkItemHandler handler = new RestGeoCodeApiCallWorkItemHandler();
        Map<String, Object> queryParams = new HashMap<String, Object>();
        queryParams.put( "URL","http://local.yahooapis.com/" );
        queryParams.put("Service", "MapsService/V1/");
        queryParams.put("Method", "geocode?");
        queryParams.put("appid","TIpNDenV34Fwcw_x32k1eX6AlQzq4wajFEFvG501Pwc6w9jKEfy2vGnkIn.r5qSQqVvyhPPaTFo-");
        //Real parameters
        queryParams.put("street", "701+First+Ave");
        queryParams.put("city", "Sunnyvale");
        queryParams.put("state", "CA");
        WorkItemImpl workItem = new WorkItemImpl();
        workItem.setParameters(queryParams);
        WorkItemManager manager = new DefaultWorkItemManager(null);
        handler.executeWorkItem( workItem, manager );
        assertEquals(HttpURLConnection.HTTP_OK, handler.getHttpResponseCode());
        assertEquals( 1, handler.getResults().size() );
        assertEquals("US", ((ResultGeoCodeApi)handler.getResults().get(0)).getCountry());
    }
View Full Code Here

TOP

Related Classes of org.jbpm.process.workitem.rest.RestGeoCodeApiCallWorkItemHandler

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.