FileDocCategorySizeDatePackage
WeightTest.javaAPI DocAndroid 5.1 API1993Thu Mar 12 22:22:12 GMT 2015android.widget.layout.table

WeightTest

public class WeightTest extends android.test.ActivityInstrumentationTestCase
{@link android.widget.layout.table.Weight} is setup to exercise tables in which cells use a weight.

Fields Summary
private android.view.View
mCell1
private android.view.View
mCell2
private android.view.View
mCell3
private android.view.View
mRow
Constructors Summary
public WeightTest()

        super("com.android.frameworks.coretests", Weight.class);
    
Methods Summary
protected voidsetUp()

        super.setUp();

        final Weight activity = getActivity();
        mCell1 = activity.findViewById(R.id.cell1);
        mCell3 = activity.findViewById(R.id.cell2);
        mCell2 = activity.findViewById(R.id.cell3);
        mRow = activity.findViewById(R.id.row);
    
public voidtestAllCellsFillParent()

        assertEquals(mCell1.getWidth() + mCell2.getWidth() + mCell3.getWidth(), mRow.getWidth());
    
public voidtestSetUpConditions()

        assertNotNull(mCell1);
        assertNotNull(mCell2);
        assertNotNull(mCell3);
        assertNotNull(mRow);