Examples of FeatureManager


Examples of org.togglz.core.manager.FeatureManager

    }

    @Test
    public void shouldSupportLookupByFeatureName() {

        FeatureManager featureManager = mock(FeatureManager.class);
        when(featureManager.isActive(featureNamed("test"))).thenReturn(true);

        FeatureMap map = new FeatureMap(featureManager);

        assertThat(map.get("test")).isEqualTo(true);
        assertThat(map.get("other")).isEqualTo(false);
View Full Code Here

Examples of org.togglz.core.manager.FeatureManager

    }

    @Test
    public void shouldSupportLookupByFeatureInstance() {

        FeatureManager featureManager = mock(FeatureManager.class);
        when(featureManager.isActive(featureNamed("test"))).thenReturn(true);

        FeatureMap map = new FeatureMap(featureManager);

        assertThat(map.get(new NamedFeature("test"))).isEqualTo(true);
        assertThat(map.get(new NamedFeature("other"))).isEqualTo(false);
View Full Code Here

Examples of org.togglz.core.manager.FeatureManager

    /**
     * Binds a FeatureManager to the thread before starting each test
     */
    @Before
    public void before() {
        FeatureManager featureManager = new FeatureManagerBuilder()
                .featureEnum(MyFeature.class)
                .stateRepository(new InMemoryStateRepository())
                .userProvider(new NoOpUserProvider())
                .build();
        ThreadLocalFeatureManagerProvider.bind(featureManager);
View Full Code Here

Examples of org.togglz.core.manager.FeatureManager

    /**
     * The first test requires a FeatureManager
     */
    @Test
    public void firstTest() {
        FeatureManager featureManager = FeatureContext.getFeatureManager();
        assertNotNull(featureManager);
    }
View Full Code Here

Examples of org.togglz.core.manager.FeatureManager

    /**
     * The second test also
     */
    @Test
    public void secondTest() {
        FeatureManager featureManager = FeatureContext.getFeatureManager();
        assertNotNull(featureManager);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.