1package com.xtremelabs.robolectric.shadows; 2 3import com.xtremelabs.robolectric.WithTestDefaultsRunner; 4 5import android.view.ViewGroup; 6import android.widget.FrameLayout; 7 8import org.junit.Test; 9import org.junit.runner.RunWith; 10 11import static org.hamcrest.CoreMatchers.instanceOf; 12import static org.junit.Assert.assertNotNull; 13import static org.junit.Assert.assertThat; 14 15/** 16 * {@link ShadowFrameLayout} test suite. 17 */ 18@RunWith(WithTestDefaultsRunner.class) 19public class FrameLayoutTest { 20 21 @Test 22 public void testNotNull() { 23 FrameLayout frameLayout = new FrameLayout(null); 24 assertNotNull(frameLayout); 25 } 26 27 @Test 28 public void getLayoutParamsShouldReturnInstanceOfMarginLayoutParams() { 29 FrameLayout frameLayout = new FrameLayout(null); 30 ViewGroup.LayoutParams layoutParams = frameLayout.getLayoutParams(); 31 assertThat(layoutParams, instanceOf(ViewGroup.MarginLayoutParams.class)); 32 } 33} 34