use of org.olat.resource.accesscontrol.model.FreeAccessMethod in project openolat by klemens.
the class ACMethodManagerTest method testStandardMethods.
@Test
public void testStandardMethods() {
List<AccessMethod> methods = acMethodManager.getAvailableMethods();
assertNotNull(methods);
assertTrue(methods.size() >= 2);
Set<String> duplicateTypes = new HashSet<>();
boolean foundFree = false;
boolean foundToken = false;
for (AccessMethod method : methods) {
Assert.assertFalse(duplicateTypes.contains(method.getType()));
if (method instanceof FreeAccessMethod) {
foundFree = true;
} else if (method instanceof TokenAccessMethod) {
foundToken = true;
}
assertTrue(method.isEnabled());
assertTrue(method.isValid());
duplicateTypes.add(method.getType());
}
assertTrue(foundFree);
assertTrue(foundToken);
}
Aggregations