Search in sources :

Example 6 with Tab

use of com.instructure.canvasapi2.models.Tab in project instructure-android by instructure.

the class TabManager method getTabs.

public static void getTabs(CanvasContext canvasContext, StatusCallback<List<Tab>> callback, boolean forceNetwork) {
    if (isTesting() || mTesting) {
    // TODO: Add testing
    // TabManager_Test.getTabs(callback, courseId)
    } else {
        RestBuilder adapter = new RestBuilder(callback);
        RestParams params = new RestParams.Builder().withCanvasContext(canvasContext).withForceReadFromNetwork(forceNetwork).withShouldIgnoreToken(false).build();
        TabAPI.getTabs(canvasContext.getId(), adapter, callback, params);
    }
}
Also used : RestParams(com.instructure.canvasapi2.builders.RestParams) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder)

Example 7 with Tab

use of com.instructure.canvasapi2.models.Tab in project instructure-android by instructure.

the class TabTest method equals_TestSameValues.

@Test
public void equals_TestSameValues() {
    Tab tabby2 = Tab.newInstance("id", "label");
    assertTrue(tabby1.equals(tabby2));
}
Also used : Tab(com.instructure.canvasapi2.models.Tab) Test(org.junit.Test)

Example 8 with Tab

use of com.instructure.canvasapi2.models.Tab in project instructure-android by instructure.

the class TabTest method equals_TestSameObject.

// region equals
@SuppressWarnings("UnnecessaryLocalVariable")
@Test
public void equals_TestSameObject() {
    Tab tabby2 = tabby1;
    assertTrue(tabby1.equals(tabby2));
}
Also used : Tab(com.instructure.canvasapi2.models.Tab) Test(org.junit.Test)

Aggregations

Tab (com.instructure.canvasapi2.models.Tab)6 Test (org.junit.Test)3 TextView (android.widget.TextView)2 TabLayout (android.support.design.widget.TabLayout)1 ViewPager (android.support.v4.view.ViewPager)1 FrameLayout (android.widget.FrameLayout)1 ImageView (android.widget.ImageView)1 RelativeLayout (android.widget.RelativeLayout)1 RestBuilder (com.instructure.canvasapi2.builders.RestBuilder)1 RestParams (com.instructure.canvasapi2.builders.RestParams)1 ApiPrefs (com.instructure.canvasapi2.utils.ApiPrefs)1 Prefs (com.instructure.pandautils.utils.Prefs)1 StudentActivityFragmentPagerAdapter (com.instructure.parentapp.adapter.StudentActivityFragmentPagerAdapter)1 ArrayList (java.util.ArrayList)1