Package org.drools.process.workitem.rss

Source Code of org.drools.process.workitem.rss.RSSWorkItemHandlerTest

package org.drools.process.workitem.rss;



import junit.framework.TestCase;

import org.drools.process.instance.impl.DefaultWorkItemManager;
import org.drools.process.instance.impl.WorkItemImpl;
import org.drools.runtime.process.WorkItemManager;

// @author: salaboy
public class RSSWorkItemHandlerTest extends TestCase {
   
 
    public void testReadRSSFeed() throws Exception {
        RSSWorkItemHandler handler = new RSSWorkItemHandler();
        WorkItemImpl workItem = new WorkItemImpl();
        workItem.setParameter( "URL", "http://salaboy.wordpress.com/feed/;http://salaboy.wordpress.com/feed/" );

       
        WorkItemManager manager = new DefaultWorkItemManager(null);
        handler.executeWorkItem( workItem, manager );

        assertEquals(2, handler.getFeeds().size());

        //En el caso real deberia registrar el workitem handler en el workitemmanager
        // workingMemory.getWorkItemManager()
        //.registerWorkItemHandler("Notification", new NotificationWorkItemHandler());

       
    }   
}
TOP

Related Classes of org.drools.process.workitem.rss.RSSWorkItemHandlerTest

TOP
Copyright © 2018 www.massapi.com. 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.