#784 Separate purge execution and purge task creation
- Delete accounts in PurgeExecutor, after permission check
This commit is contained in:
@@ -219,7 +219,7 @@ public abstract class AbstractResourceClosingTest {
|
||||
|
||||
Object element = PARAM_VALUES.get(genericType);
|
||||
Preconditions.checkNotNull(element, "No sample element for list of generic type " + genericType);
|
||||
if (List.class == parameterizedType.getRawType()) {
|
||||
if (isAssignableFrom(parameterizedType.getRawType(), List.class)) {
|
||||
return Arrays.asList(element, element, element);
|
||||
} else if (Set.class == parameterizedType.getRawType()) {
|
||||
return new HashSet<>(Arrays.asList(element, element, element));
|
||||
@@ -229,6 +229,11 @@ public abstract class AbstractResourceClosingTest {
|
||||
throw new IllegalStateException("Cannot build list for unexpected Type: " + type);
|
||||
}
|
||||
|
||||
private static boolean isAssignableFrom(Type type, Class<?> fromType) {
|
||||
return (type instanceof Class<?>)
|
||||
&& ((Class<?>) type).isAssignableFrom(fromType);
|
||||
}
|
||||
|
||||
/* Initialize the map of test values to pass to methods to satisfy their signature. */
|
||||
private static Map<Class<?>, Object> getDefaultParameters() {
|
||||
HashedPassword hash = new HashedPassword("test", "test");
|
||||
|
||||
Reference in New Issue
Block a user