use of com.instructure.canvasapi2.models.Course in project instructure-android by instructure.
the class CanvasContextTest method getContextId_TestCourse.
// endregion
// region getContextId
@Test
public void getContextId_TestCourse() {
Course course = new Course();
course.setId(1234);
assertEquals("course_1234", course.getContextId());
}
use of com.instructure.canvasapi2.models.Course in project instructure-android by instructure.
the class CanvasContextTest method getGenericContext_TestCourse.
@Test
public void getGenericContext_TestCourse() {
long id = 1234;
String name = "hodor";
Course course = new Course();
course.setId(id);
course.setName(name);
assertEquals(true, course.equals(CanvasContext.getGenericContext(CanvasContext.Type.COURSE, id, name)));
}
use of com.instructure.canvasapi2.models.Course in project instructure-android by instructure.
the class CanvasContextTest method getHomePageID_TestHomeModules.
@Test
public void getHomePageID_TestHomeModules() {
Course course = new Course();
course.setHomePage(CanvasContext.HOME_MODULES);
assertEquals(Tab.MODULES_ID, course.getHomePageID());
}
use of com.instructure.canvasapi2.models.Course in project instructure-android by instructure.
the class CanvasContextTest method toAPIString_TestCourse.
@Test
public void toAPIString_TestCourse() {
Course course = new Course();
course.setId(1234);
assertEquals("/courses/1234", course.toAPIString());
}
use of com.instructure.canvasapi2.models.Course in project instructure-android by instructure.
the class CanvasContextTest method getSecondaryName_TestCourse.
// endregion
@Test
public void getSecondaryName_TestCourse() {
Course course = new Course();
String courseCode = "Hodor";
course.setCourseCode(courseCode);
assertEquals(courseCode, course.getSecondaryName());
}
Aggregations