Package org.apache.commons.collections.map

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


        assertEqualsStatus.InProgress, task2.getTaskData().getStatus() );
        assertEquals( users.get( "darth" ), task2.getTaskData().getActualOwner() );                 
    }   

    public void testCompleteWithContent() {
        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


        Content content = getContentResponseHandler.getContent();
        assertEquals("content", new String(content.getContent()));
    }
       
    public void testFail() {
        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.Failed, task2.getTaskData().getStatus() );
        assertEquals( users.get( "darth" ), task2.getTaskData().getActualOwner() );                 
    }
   
    public void testFailWithIncorrectUser() {
        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 testFailWithContent() {
        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

import org.drools.task.event.TaskClaimedEvent;
import org.drools.task.event.TaskEventKey;

public class MockEventMessagingTest extends BaseTest {   
    public void testMockTransport() 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

        client.disconnect();
        server.stop();
    }   
   
    public void testClaimEvent() 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

    public void testDummy() {
        assertTrue( true );
    }

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

        MockEscalatedDeadlineHandler handler = new MockEscalatedDeadlineHandler();
        taskService.setEscalatedDeadlineHandler( handler )
       
        //Reader reader;
        Reader reader = new InputStreamReader( getClass().getResourceAsStream( "../QueryData_UnescalatedDeadlines.mvel" ) );
        List<Task> tasks = (List<Task>) eval( reader,
                                              vars );
        long now = ((Date)vars.get( "now" )).getTime();
       
        for ( Task task : tasks ) { 
            BlockingAddTaskResponseHandler addTaskResponseHandler = new BlockingAddTaskResponseHandler();           
            client.addTask( task, null, addTaskResponseHandler );
            addTaskResponseHandler.waitTillDone( 3000 );
View Full Code Here

        assertEquals( now + 24000,
                      item2.getDeadline().getDate().getTime() );       
    }
   
    public void FIXME_testUnescalatedDeadlinesOnStartup() throws Exception {
        Map vars = new HashedMap();
        vars.put( "users",
                  users );
        vars.put( "groups",
                  groups );

        //Reader reader;
        Reader reader = new InputStreamReader( getClass().getResourceAsStream( "../QueryData_UnescalatedDeadlines.mvel" ) );
        List<Task> tasks = (List<Task>) eval( reader,
                                              vars );
        long now = ((Date)vars.get( "now" )).getTime();
       
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        for ( Task task : tasks ) {
            // for this one we put the task in directly;
View Full Code Here

    @Test
    public void testGetAttachmentName() throws Exception
    {
        @SuppressWarnings("unchecked")
        Map<String, Part> attachments = new HashedMap();

        String key = "test.txt";
        assertEquals(key, MailUtils.getAttachmentName(key, attachments));

        attachments.put(key, new MimeBodyPart());
        assertEquals("0_" + key, MailUtils.getAttachmentName(key, attachments));
    }
View Full Code Here

public class InvalidSchemaValidationTestCase extends AbstractSchemaValidationTestCase
{
    @After
    public void doCleanUp()
    {
        schemas = new HashedMap();
    }
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.