All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.tinkoff.testops.droidherd.auth.AuthProviderCreator Maven / Gradle / Ivy

Go to download

A library that parallelizes Android Test execution to all connected devices and emulators

There is a newer version: 1.0.0
Show newest version
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