FileDocCategorySizeDatePackage
CellSpanTest.javaAPI DocAndroid 5.1 API2884Thu Mar 12 22:22:12 GMT 2015android.widget.layout.table

CellSpanTest

public class CellSpanTest extends android.test.ActivityInstrumentationTestCase
{@link android.widget.layout.table.CellSpan} is setup to exercise tables in which cells use spanning.

Fields Summary
private android.view.View
mA
private android.view.View
mB
private android.view.View
mC
private android.view.View
mSpanThenCell
private android.view.View
mCellThenSpan
private android.view.View
mSpan
Constructors Summary
public CellSpanTest()

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

        super.setUp();

        final CellSpan activity = getActivity();
        mA            = activity.findViewById(R.id.a);
        mB            = activity.findViewById(R.id.b);
        mC            = activity.findViewById(R.id.c);
        mSpanThenCell = activity.findViewById(R.id.spanThenCell);
        mCellThenSpan = activity.findViewById(R.id.cellThenSpan);
        mSpan         = activity.findViewById(R.id.span);
    
public voidtestCellThenSpan()

        int spanWidth = mB.getMeasuredWidth() + mC.getMeasuredWidth();
        assertEquals("cell followed by span is broken", spanWidth,
                mCellThenSpan.getMeasuredWidth());
    
public voidtestSetUpConditions()

        assertNotNull(mA);
        assertNotNull(mB);
        assertNotNull(mC);
        assertNotNull(mSpanThenCell);
        assertNotNull(mCellThenSpan);
        assertNotNull(mSpan);
    
public voidtestSpan()

        int spanWidth = mA.getMeasuredWidth() + mB.getMeasuredWidth() +
                mC.getMeasuredWidth();
        assertEquals("span is broken", spanWidth, mSpan.getMeasuredWidth());
    
public voidtestSpanThenCell()

        int spanWidth = mA.getMeasuredWidth() + mB.getMeasuredWidth();
        assertEquals("span followed by cell is broken", spanWidth,
                mSpanThenCell.getMeasuredWidth());