FileDocCategorySizeDatePackage
MessengerTest.javaAPI DocAndroid 5.1 API3826Thu Mar 12 22:22:12 GMT 2015android.os

MessengerTest

public class MessengerTest extends android.test.AndroidTestCase

Fields Summary
private android.os.Messenger
mServiceMessenger
private android.content.ServiceConnection
mConnection
Constructors Summary
Methods Summary
protected voidsetUp()

        super.setUp();
        getContext().bindService(new Intent(mContext, MessengerService.class),
                mConnection, Context.BIND_AUTO_CREATE);
        synchronized (this) {
            while (mServiceMessenger == null) {
                try {
                    wait();
                } catch (InterruptedException e) {
                }
            }
        }
    
protected voidtearDown()

        super.tearDown();
        getContext().unbindService(mConnection);
    
public voidtestSend()

        (new TestThread()).doTest(1000);