FileDocCategorySizeDatePackage
BaselineAlignmentCenterGravityTest.javaAPI DocAndroid 1.5 API2599Wed May 06 22:42:02 BST 2009com.android.frameworktest.layout.linear

BaselineAlignmentCenterGravityTest

public class BaselineAlignmentCenterGravityTest extends android.test.ActivityInstrumentationTestCase

Fields Summary
private android.widget.Button
mButton1
private android.widget.Button
mButton2
private android.widget.Button
mButton3
Constructors Summary
public BaselineAlignmentCenterGravityTest()

        super("com.android.frameworktest", BaselineAlignmentCenterGravity.class);
    
Methods Summary
protected voidsetUp()

        super.setUp();

        final Activity activity = getActivity();
        mButton1 = (Button) activity.findViewById(R.id.button1);
        mButton2 = (Button) activity.findViewById(R.id.button2);
        mButton3 = (Button) activity.findViewById(R.id.button3);
    
public voidtestChildrenAligned()

        final View parent = (View) mButton1.getParent();
        ViewAsserts.assertTopAligned(mButton1, parent);
        ViewAsserts.assertTopAligned(mButton2, parent);
        ViewAsserts.assertTopAligned(mButton3, parent);
        ViewAsserts.assertBottomAligned(mButton1, parent);
        ViewAsserts.assertBottomAligned(mButton2, parent);
        ViewAsserts.assertBottomAligned(mButton3, parent);
        ViewAsserts.assertTopAligned(mButton1, mButton2);
        ViewAsserts.assertTopAligned(mButton2, mButton3);
        ViewAsserts.assertBottomAligned(mButton1, mButton2);
        ViewAsserts.assertBottomAligned(mButton2, mButton3);
    
public voidtestSetUpConditions()

        assertNotNull(mButton1);
        assertNotNull(mButton2);
        assertNotNull(mButton3);