Search in sources :

Example 31 with Course

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

the class CanvasContextTest method typeIsUser_TestFalse.

@Test
public void typeIsUser_TestFalse() {
    Course course = new Course();
    assertEquals(false, CanvasContext.Type.isUser(course));
}
Also used : Course(com.instructure.canvasapi2.models.Course) Test(org.junit.Test)

Example 32 with Course

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

the class CanvasContextTest method getApiContext_TestCourses.

// endregion
@Test
public void getApiContext_TestCourses() {
    Course course = new Course();
    assertEquals("courses", CanvasContext.getApiContext(course));
}
Also used : Course(com.instructure.canvasapi2.models.Course) Test(org.junit.Test)

Example 33 with Course

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

the class CanvasContextTest method equals_TestFalse.

@Test
public void equals_TestFalse() {
    Course course = new Course();
    Group group = new Group();
    assertEquals(false, course.equals(group));
}
Also used : Group(com.instructure.canvasapi2.models.Group) Course(com.instructure.canvasapi2.models.Course) Test(org.junit.Test)

Example 34 with Course

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

the class CanvasContextTest method getHomePageID_TestHomeFeed.

@Test
public void getHomePageID_TestHomeFeed() {
    Course course = new Course();
    course.setHomePage(CanvasContext.HOME_FEED);
    assertEquals(Tab.NOTIFICATIONS_ID, course.getHomePageID());
}
Also used : Course(com.instructure.canvasapi2.models.Course) Test(org.junit.Test)

Example 35 with Course

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

the class CanvasContextTest method fromContextCode_TestCourse.

@Test
public void fromContextCode_TestCourse() {
    Course course = new Course();
    course.setId(1234);
    assertEquals(true, course.equals(CanvasContext.fromContextCode(course.getContextId())));
}
Also used : Course(com.instructure.canvasapi2.models.Course) Test(org.junit.Test)

Aggregations

Course (com.instructure.canvasapi2.models.Course)106 Test (org.junit.Test)70 ArrayList (java.util.ArrayList)39 Enrollment (com.instructure.canvasapi2.models.Enrollment)29 RestBuilder (com.instructure.canvasapi2.builders.RestBuilder)17 RestParams (com.instructure.canvasapi2.builders.RestParams)17 View (android.view.View)13 Bundle (android.os.Bundle)10 TextView (android.widget.TextView)10 NonNull (android.support.annotation.NonNull)8 AdapterView (android.widget.AdapterView)8 ModuleItem (com.instructure.canvasapi2.models.ModuleItem)8 ParentFragment (com.instructure.candroid.fragment.ParentFragment)7 CanvasContext (com.instructure.canvasapi2.models.CanvasContext)7 ImageView (android.widget.ImageView)6 LinkHeaders (com.instructure.canvasapi2.utils.LinkHeaders)6 List (java.util.List)6 BindView (butterknife.BindView)5 RecyclerView (android.support.v7.widget.RecyclerView)4 StatusCallback (com.instructure.canvasapi2.StatusCallback)4