Home | History | Annotate | Download | only in shadows
      1 package com.xtremelabs.robolectric.shadows;
      2 
      3 import com.xtremelabs.robolectric.WithTestDefaultsRunner;
      4 
      5 import android.view.ViewGroup;
      6 import android.widget.FrameLayout;
      7 
      8 import org.junit.Test;
      9 import org.junit.runner.RunWith;
     10 
     11 import static org.hamcrest.CoreMatchers.instanceOf;
     12 import static org.junit.Assert.assertNotNull;
     13 import static org.junit.Assert.assertThat;
     14 
     15 /**
     16  * {@link ShadowFrameLayout} test suite.
     17  */
     18 @RunWith(WithTestDefaultsRunner.class)
     19 public 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