Examples of InMemoryStateRepository


Examples of org.togglz.core.repository.mem.InMemoryStateRepository

    private TestFeatureUserProvider featureUserProvider;

    @Before
    public void before() {

        repository = new InMemoryStateRepository();
        repository.setFeatureState(new FeatureState(MyFeatures.DELETE_USERS, true)
            .setStrategyId(UsernameActivationStrategy.ID)
            .setParameter(UsernameActivationStrategy.PARAM_USERS, "admin"));
        repository.setFeatureState(new FeatureState(MyFeatures.MISSING_STRATEGY, true)
            .setStrategyId("NoSuchActivationStrategy"));
View Full Code Here

Examples of org.togglz.core.repository.mem.InMemoryStateRepository

        return TestFeature.class;
    }

    @Override
    public StateRepository getStateRepository() {
        InMemoryStateRepository repository = new InMemoryStateRepository();
        repository.setFeatureState(new FeatureState(TestFeature.DISABLED, false));
        repository.setFeatureState(new FeatureState(TestFeature.ENABLED_FOR_ALL, true));
        repository.setFeatureState(new FeatureState(TestFeature.ENABLED_FOR_CK, true)
            .setStrategyId(UsernameActivationStrategy.ID)
            .setParameter(UsernameActivationStrategy.PARAM_USERS, "ck"));
        return repository;
    }
View Full Code Here

Examples of org.togglz.core.repository.mem.InMemoryStateRepository

        return TestFeature.class;
    }

    @Override
    public StateRepository getStateRepository() {
        InMemoryStateRepository repository = new InMemoryStateRepository();
        repository.setFeatureState(new FeatureState(TestFeature.DISABLED, false));
        repository.setFeatureState(new FeatureState(TestFeature.ENABLED_FOR_ALL, true));
        repository.setFeatureState(new FeatureState(TestFeature.ENABLED_FOR_CK, true)
            .setStrategyId(UsernameActivationStrategy.ID)
            .setParameter(UsernameActivationStrategy.PARAM_USERS, "ck"));
        return repository;
    }
View Full Code Here

Examples of org.togglz.core.repository.mem.InMemoryStateRepository

    return UserFeatures.class;
  }

  @Override
  public StateRepository getStateRepository() {
    return new InMemoryStateRepository();
  }
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.