Search in sources :

Example 51 with Enrollment

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

the class EnrollmentTest method isStudent_Student.

@Test
public void isStudent_Student() {
    Enrollment enrollment = new Enrollment();
    enrollment.setType("student");
    assertEquals(true, enrollment.isStudent());
}
Also used : Enrollment(com.instructure.canvasapi2.models.Enrollment) Test(org.junit.Test)

Example 52 with Enrollment

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

the class EnrollmentTest method isTeacher_Teacher.

@Test
public void isTeacher_Teacher() {
    Enrollment enrollment = new Enrollment();
    enrollment.setType("teacher");
    assertEquals(true, enrollment.isTeacher());
}
Also used : Enrollment(com.instructure.canvasapi2.models.Enrollment) Test(org.junit.Test)

Example 53 with Enrollment

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

the class EnrollmentTest method isObserver_ObserverEnrollment.

@Test
public void isObserver_ObserverEnrollment() {
    Enrollment enrollment = new Enrollment();
    enrollment.setType("observerenrollment");
    assertEquals(true, enrollment.isObserver());
}
Also used : Enrollment(com.instructure.canvasapi2.models.Enrollment) Test(org.junit.Test)

Example 54 with Enrollment

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

the class EnrollmentTest method isTa_TaEnrollment.

@Test
public void isTa_TaEnrollment() {
    Enrollment enrollment = new Enrollment();
    enrollment.setType("taenrollment");
    assertEquals(true, enrollment.isTA());
}
Also used : Enrollment(com.instructure.canvasapi2.models.Enrollment) Test(org.junit.Test)

Example 55 with Enrollment

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

the class EnrollmentTest method getCurrentGrade_NullGrades.

@Test
public void getCurrentGrade_NullGrades() {
    Enrollment enrollment = new Enrollment();
    enrollment.setComputedCurrentGrade("C-");
    enrollment.setGrades(null);
    assertEquals("C-", enrollment.getCurrentGrade());
}
Also used : Enrollment(com.instructure.canvasapi2.models.Enrollment) Test(org.junit.Test)

Aggregations

Enrollment (com.instructure.canvasapi2.models.Enrollment)55 Test (org.junit.Test)46 Course (com.instructure.canvasapi2.models.Course)30 ArrayList (java.util.ArrayList)25 RestBuilder (com.instructure.canvasapi2.builders.RestBuilder)7 RestParams (com.instructure.canvasapi2.builders.RestParams)7 NonNull (android.support.annotation.NonNull)4 Grades (com.instructure.canvasapi2.models.Grades)4 StatusCallback (com.instructure.canvasapi2.StatusCallback)3 ExhaustiveListCallback (com.instructure.canvasapi2.utils.ExhaustiveListCallback)3 List (java.util.List)3 GradingPeriod (com.instructure.canvasapi2.models.GradingPeriod)2 User (com.instructure.canvasapi2.models.User)2 Application (android.app.Application)1 PackageInfo (android.content.pm.PackageInfo)1 PackageManager (android.content.pm.PackageManager)1 View (android.view.View)1 BasicUser (com.instructure.canvasapi2.models.BasicUser)1 ErrorReportResult (com.instructure.canvasapi2.models.ErrorReportResult)1 ApiType (com.instructure.canvasapi2.utils.ApiType)1