use of com.instructure.canvasapi2.models.Course in project instructure-android by instructure.
the class CanvasContextTest method canCreateDiscussions_TestTrue.
// endregion
@Test
public void canCreateDiscussions_TestTrue() {
Course course = new Course();
CanvasContextPermission canvasContextPermission = new CanvasContextPermission();
canvasContextPermission.setCanCreateDiscussionTopic(true);
course.setPermissions(canvasContextPermission);
assertEquals(true, course.canCreateDiscussion());
}
use of com.instructure.canvasapi2.models.Course in project instructure-android by instructure.
the class CanvasContextTest method equals_TestTrue.
@Test
public void equals_TestTrue() {
Course course1 = new Course();
Course course2 = new Course();
assertEquals(true, course1.equals(course2));
}
use of com.instructure.canvasapi2.models.Course in project instructure-android by instructure.
the class CanvasContextTest method getHomePageID_TestNull.
// region getHomePageID
@Test
public void getHomePageID_TestNull() {
Course course = new Course();
course.setHomePage(null);
assertEquals(Tab.NOTIFICATIONS_ID, course.getHomePageID());
}
use of com.instructure.canvasapi2.models.Course in project instructure-android by instructure.
the class CanvasContextTest method typeIsSection_TestFalse.
@Test
public void typeIsSection_TestFalse() {
Course course = new Course();
assertEquals(false, CanvasContext.Type.isSection(course));
}
use of com.instructure.canvasapi2.models.Course in project instructure-android by instructure.
the class CourseTest method getLicense_empty.
@Test
public void getLicense_empty() {
Course course = new Course();
course.setLicense("");
assertEquals(Course.LICENSE.PRIVATE_COPYRIGHTED, course.getLicense());
}
Aggregations