Package org.agilewiki.jactor.basics

Source Code of org.agilewiki.jactor.basics.Test2a

package org.agilewiki.jactor.basics;

import junit.framework.TestCase;
import org.agilewiki.jactor.JAFuture;
import org.agilewiki.jactor.JAMailboxFactory;
import org.agilewiki.jactor.Mailbox;
import org.agilewiki.jactor.MailboxFactory;

/**
* Test code.
*/
public class Test2a extends TestCase {
    public void test() throws Exception {
        MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(10);
        Mailbox mailbox = mailboxFactory.createMailbox();
        Actor1 actor1 = new Actor1();
        actor1.initialize(mailbox);
        Actor2 actor2 = new Actor2();
        actor2.initialize(mailbox, actor1);
        JAFuture future = new JAFuture();
        String result = Hi1.req.send(future, actor2);
        assertEquals("Hello world!", result);
        mailboxFactory.close();
    }
}
TOP

Related Classes of org.agilewiki.jactor.basics.Test2a

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.