use of com.instructure.canvasapi2.models.LockedModule 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.LockedModule in project instructure-android by instructure.
the class LockedModuleTest method isLockedModuleValid_NullPrerequisites.
@Test
public void isLockedModuleValid_NullPrerequisites() {
LockedModule module = getValidLockedModule();
module.setPrerequisites(null);
assertEquals(false, LockedModule.isLockedModuleValid(module));
}
use of com.instructure.canvasapi2.models.LockedModule in project instructure-android by instructure.
the class LockedModuleTest method isLockedModuleValid_InvalidUnlockDate.
@Test
public void isLockedModuleValid_InvalidUnlockDate() {
LockedModule module = getValidLockedModule();
module.setUnlockAt(null);
assertEquals(false, LockedModule.isLockedModuleValid(module));
}
use of com.instructure.canvasapi2.models.LockedModule in project instructure-android by instructure.
the class LockedModuleTest method isLockedModuleValid_ValidModule.
@Test
public void isLockedModuleValid_ValidModule() {
LockedModule module = getValidLockedModule();
assertEquals(true, LockedModule.isLockedModuleValid(module));
}
use of com.instructure.canvasapi2.models.LockedModule in project instructure-android by instructure.
the class LockedModuleTest method isLockedModuleValid_InvalidName.
@Test
public void isLockedModuleValid_InvalidName() {
LockedModule module = getValidLockedModule();
module.setName(null);
assertEquals(false, LockedModule.isLockedModuleValid(module));
}
Aggregations