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

de.otto.edison.testsupport.togglz.TestFeatureManagerProvider Maven / Gradle / Ivy

There is a newer version: 3.3.3
Show newest version
package de.otto.edison.testsupport.togglz;

import org.togglz.core.manager.FeatureManager;
import org.togglz.core.spi.FeatureManagerProvider;

/**
 *
 * This {@link FeatureManagerProvider} is used by the testing integration modules to provide a FeatureManager in unit tests.
 *
 *
 *
 */
public class TestFeatureManagerProvider implements FeatureManagerProvider {

    private static FeatureManager instance;

    @Override
    public int priority() {
        // very high priority
        return 10;
    }

    @Override
    public FeatureManager getFeatureManager() {
        return instance;
    }

    public static void setFeatureManager(FeatureManager instance) {
        TestFeatureManagerProvider.instance = instance;
    }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy