Package org.apache.commons.collections.map

Examples of org.apache.commons.collections.map.HashedMap


        assertEquals( Status.Reserved, task2.getTaskData().getStatus() );    
        assertEquals( users.get( "bobba" ), task1.getTaskData().getActualOwner() );       
    }
   
    public void testStop() {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
        vars.put( "now", new Date() );
       
        // One potential owner, should go straight to state Reserved
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { } ), ";
        str += "peopleAssignments = (with ( new PeopleAssignments() ) { potentialOwners = [users['bobba' ], users['darth'] ], }),";                       
        str += "names = [ new I18NText( 'en-UK', 'This is my task name')] })";
View Full Code Here


        assertEqualsStatus.Reserved, task2.getTaskData().getStatus() );
        assertEquals( users.get( "darth" ), task2.getTaskData().getActualOwner() );               
    }   
   
    public void testStopWithIncorrectUser() {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
        vars.put( "now", new Date() );
       
        // One potential owner, should go straight to state Reserved
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { } ), ";
        str += "peopleAssignments = (with ( new PeopleAssignments() ) { potentialOwners = [users['bobba' ], users['darth'] ], }),";                       
        str += "names = [ new I18NText( 'en-UK', 'This is my task name')] })";
View Full Code Here

        assertEqualsStatus.InProgress, task2.getTaskData().getStatus() );
        assertEquals( users.get( "darth" ), task2.getTaskData().getActualOwner() );               
    }  
   
    public void testReleaseFromInprogress() throws Exception {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
        vars.put( "now", new Date() );
       
        // One potential owner, should go straight to state Reserved
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { } ), ";
        str += "peopleAssignments = (with ( new PeopleAssignments() ) { potentialOwners = [users['bobba' ], users['darth'] ], }),";                       
        str += "names = [ new I18NText( 'en-UK', 'This is my task name')] })";
View Full Code Here

        assertEqualsStatus.Ready, task2.getTaskData().getStatus() );
        assertNull( task2.getTaskData().getActualOwner() );                 
    }   
   
    public void testReleaseFromReserved() {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
        vars.put( "now", new Date() );
       
        // One potential owner, should go straight to state Reserved
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { } ), ";
        str += "peopleAssignments = (with ( new PeopleAssignments() ) { potentialOwners = [users['bobba' ], users['darth'] ], }),";                       
        str += "names = [ new I18NText( 'en-UK', 'This is my task name')] })";
View Full Code Here

        assertEqualsStatus.Ready, task2.getTaskData().getStatus() );
        assertNull( task2.getTaskData().getActualOwner() );                 
    }    
   
    public void testReleaseWithIncorrectUser() {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
        vars.put( "now", new Date() );
       
        // One potential owner, should go straight to state Reserved
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { } ), ";
        str += "peopleAssignments = (with ( new PeopleAssignments() ) { potentialOwners = [users['bobba' ], users['darth'] ], }),";                       
        str += "names = [ new I18NText( 'en-UK', 'This is my task name')] })";
View Full Code Here

        assertEqualsStatus.Reserved, task1.getTaskData().getStatus() );
        assertEquals( users.get( "darth" ), task1.getTaskData().getActualOwner() );
    }

    public void testSuspendFromReady() {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
        vars.put( "now", new Date() );
       
        // One potential owner, should go straight to state Reserved
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { } ), ";
        str += "peopleAssignments = (with ( new PeopleAssignments() ) { potentialOwners = [users['bobba' ], users['darth'] ], }),";                       
        str += "names = [ new I18NText( 'en-UK', 'This is my task name')] })";
View Full Code Here

        assertEquals( Status.Ready, task2.getTaskData().getPreviousStatus() );
        assertNull( task1.getTaskData().getActualOwner() );                 
    }
   
    public void testSuspendFromReserved() {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
        vars.put( "now", new Date() );
       
        // One potential owner, should go straight to state Reserved
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { } ), ";
        str += "peopleAssignments = (with ( new PeopleAssignments() ) { potentialOwners = [users['bobba' ], users['darth'] ], }),";                       
        str += "names = [ new I18NText( 'en-UK', 'This is my task name')] })";
View Full Code Here

  protected TaskServer server;
    protected TaskClient client;

    @SuppressWarnings("unchecked")
    public void testTasksOwnedQueryWithI18N() throws Exception {
        Map<String, Object>  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
       
        //Reader reader;
        Reader reader = new InputStreamReader( getClass().getResourceAsStream( "../QueryData_TasksOwned.mvel" ) );
        List<Task> tasks = (List<Task>) eval( reader,
                                              vars );
View Full Code Here

        assertTrue( CollectionUtils.equals( expected.get( "darth" ),
                                            actual ) );
    }

    public void testPeopleAssignmentQueries() {
        Map vars = new HashedMap();
        vars.put( "users",
                  users );
        vars.put( "groups",
                  groups );

        Reader reader = new InputStreamReader( getClass().getResourceAsStream( "../QueryData_TasksOwned.mvel" ) );
        List<Task> tasks = (List<Task>) eval( reader,
                                              vars );
View Full Code Here

  public static void main(String[] args) {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.drools.task");
        TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
        TaskServiceSession taskSession = taskService.createSession();
        // Add users
        Map vars = new HashedMap();
        Reader reader = new InputStreamReader( BaseTest.class.getResourceAsStream( "LoadUsers.mvel" ) );    
        Map<String, User> users = ( Map<String, User> ) eval( reader, vars );  
        for ( User user : users.values() ) {
            taskSession.addUser( user );
        }          
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.map.HashedMap

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.