当前位置: 首页>>代码示例>>Java>>正文


Java FeatureContext类代码示例

本文整理汇总了Java中org.togglz.core.context.FeatureContext的典型用法代码示例。如果您正苦于以下问题:Java FeatureContext类的具体用法?Java FeatureContext怎么用?Java FeatureContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FeatureContext类属于org.togglz.core.context包,在下文中一共展示了FeatureContext类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initPaasFeatureManagerProvider

import org.togglz.core.context.FeatureContext; //导入依赖的package包/类
@PostConstruct
public void initPaasFeatureManagerProvider() {
	logger.debug("Initialize PaasFeatureManagerProvider");
	PaasFeatureManagerProvider.bind(config);

	PaasFeatureManagerProvider.setPriority(getProviderPriority());
	logger.info("Testing Feature Toggles Context is properly set-up");
	
	FeatureContext.getFeatureManager();
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:11,代码来源:PaasFeatureManagerProviderConfigurer.java

示例2: setup

import org.togglz.core.context.FeatureContext; //导入依赖的package包/类
@Before
public void setup() {
	// Ensure that PaasFeatureManagerProvider will be queried first
	PaasFeatureManagerProvider.setPriority(0);
	// Ensure FeatureContext cache is empty
	FeatureContext.clearCache();
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:8,代码来源:PaasFeatureManagerProviderSpringTest.java

示例3: default_feature_manager_is_not_a_test_feature_manager

import org.togglz.core.context.FeatureContext; //导入依赖的package包/类
@Test
public void default_feature_manager_is_not_a_test_feature_manager() {
	// Given a configured TestFeatureManagerProvider
	FeatureManager testFeatureManager = new TestFeatureManager(PaasFeatures.class);
	TestFeatureManagerProvider.setFeatureManager(testFeatureManager);
	
	// When
	FeatureManager featureManager = FeatureContext.getFeatureManager();
	
	// Then
	assertTrue("The feature manager should not be provided by the TestFeatureManagerProvider",featureManager != testFeatureManager);
	assertTrue("The feature manager should not be provided by the FallbackTestFeatureManagerProvider",!(featureManager instanceof FallbackTestFeatureManager));
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:14,代码来源:PaasFeatureManagerProviderSpringTest.java

示例4: disable

import org.togglz.core.context.FeatureContext; //导入依赖的package包/类
public static void disable(final Feature feature) {
    FeatureContext.getFeatureManager().setFeatureState(new FeatureState(feature, false));
}
 
开发者ID:otto-de,项目名称:edison-microservice,代码行数:4,代码来源:FeatureManagerSupport.java

示例5: a_default_feature_manager_should_be_available

import org.togglz.core.context.FeatureContext; //导入依赖的package包/类
@Test
public void a_default_feature_manager_should_be_available() {
	FeatureManager featureManager = FeatureContext.getFeatureManager();
	assertNotNull(featureManager);
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:6,代码来源:PaasFeatureManagerProviderSpringTest.java

示例6: isActive

import org.togglz.core.context.FeatureContext; //导入依赖的package包/类
@Override
public boolean isActive() {
    return FeatureContext.getFeatureManager().isActive(this);
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:5,代码来源:PaasJndiStateRepositoryTest.java

示例7: isFeatureActive

import org.togglz.core.context.FeatureContext; //导入依赖的package包/类
protected boolean isFeatureActive(Feature feature) {
	return FeatureContext.getFeatureManager().isActive(feature);
}
 
开发者ID:heneke,项目名称:thymeleaf-extras-togglz,代码行数:4,代码来源:AbstractTogglzTest.java


注:本文中的org.togglz.core.context.FeatureContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。