use of com.instructure.canvasapi2.models.LockInfo in project instructure-android by instructure.
the class AssignmentTest method isLocked_TestUnlockAfterCurrentDate.
@Test
public void isLocked_TestUnlockAfterCurrentDate() {
Assignment assignment = new Assignment();
LockInfo lockInfo = new LockInfo();
long time = Calendar.getInstance().getTimeInMillis() + 100000;
Date date = new Date(time);
lockInfo.setUnlockAt(APIHelper.dateToString(date));
assignment.setLockInfo(lockInfo);
assertEquals(true, assignment.isLocked());
}
use of com.instructure.canvasapi2.models.LockInfo in project instructure-android by instructure.
the class AssignmentTest method isLocked_TestLockedModuleName.
@Test
public void isLocked_TestLockedModuleName() {
Assignment assignment = new Assignment();
LockInfo lockInfo = new LockInfo();
LockedModule lockedModule = new LockedModule();
lockedModule.setName("Hodor");
lockInfo.setContextModule(lockedModule);
assignment.setLockInfo(lockInfo);
assertEquals(true, assignment.isLocked());
}
use of com.instructure.canvasapi2.models.LockInfo in project instructure-android by instructure.
the class AssignmentTest method isLocked_TestEmptyLockInfo.
@Test
public void isLocked_TestEmptyLockInfo() {
Assignment assignment = new Assignment();
LockInfo lockInfo = new LockInfo();
assignment.setLockInfo(lockInfo);
assertEquals(false, assignment.isLocked());
}
Aggregations