ru.tinkoff.testops.droidherd.auth.AuthProviderCreator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of droidherd-client Show documentation
Show all versions of droidherd-client Show documentation
A library that parallelizes Android Test execution to all connected devices and emulators
package ru.tinkoff.testops.droidherd.auth;
public class AuthProviderCreator {
public static AuthProvider create(String className) {
try {
if (className == null) {
className = "ru.tinkoff.testops.droidherd.auth.BasicAuthProvider";
}
Class> clazz = Class.forName(className);
Object instance = clazz.getDeclaredConstructor().newInstance();
if (instance instanceof AuthProvider) {
return (AuthProvider) instance;
}
throw new RuntimeException("Bad auth provider supplied: " + className + ". It must implements AuthProvider interface.");
} catch (Exception e) {
throw new RuntimeException("Failed to create droidherd auth provider: " + className, e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy