Search in sources :

Example 1 with TabActivity

use of android.app.TabActivity in project robolectric by robolectric.

the class ShadowTabActivityTest method tabActivityShouldNotMakeNewTabHostEveryGet.

@Test
public void tabActivityShouldNotMakeNewTabHostEveryGet() throws Exception {
    TabActivity activity = Robolectric.buildActivity(TabActivity.class).create().get();
    TabHost tabHost1 = activity.getTabHost();
    TabHost tabHost2 = activity.getTabHost();
    assertThat(tabHost1).isEqualTo(tabHost2);
}
Also used : TabActivity(android.app.TabActivity) TabHost(android.widget.TabHost) Test(org.junit.Test)

Example 2 with TabActivity

use of android.app.TabActivity in project robolectric by robolectric.

the class ShadowTabHostTest method shouldGetTabWidget.

@Test
public void shouldGetTabWidget() throws Exception {
    TabActivity activity = Robolectric.buildActivity(TabActivity.class).create().get();
    activity.setContentView(R.layout.tab_activity);
    TabHost host = new TabHost(activity);
    assertThat(host.getTabWidget()).isInstanceOf(TabWidget.class);
}
Also used : TabActivity(android.app.TabActivity) TabHost(android.widget.TabHost) Test(org.junit.Test)

Example 3 with TabActivity

use of android.app.TabActivity in project robolectric by robolectric.

the class ShadowTabActivityTest method shouldGetTabWidget.

@Test
public void shouldGetTabWidget() throws Exception {
    TabActivity activity = Robolectric.buildActivity(TabActivity.class).create().get();
    activity.setContentView(R.layout.tab_activity);
    assertThat(activity.getTabWidget()).isInstanceOf(TabWidget.class);
}
Also used : TabActivity(android.app.TabActivity) Test(org.junit.Test)

Aggregations

TabActivity (android.app.TabActivity)3 Test (org.junit.Test)3 TabHost (android.widget.TabHost)2