本文整理汇总了Java中org.jboss.arquillian.config.descriptor.api.ExtensionDef.getExtensionProperties方法的典型用法代码示例。如果您正苦于以下问题:Java ExtensionDef.getExtensionProperties方法的具体用法?Java ExtensionDef.getExtensionProperties怎么用?Java ExtensionDef.getExtensionProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jboss.arquillian.config.descriptor.api.ExtensionDef
的用法示例。
在下文中一共展示了ExtensionDef.getExtensionProperties方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readMethodsFromConfiguration
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入方法依赖的package包/类
private Set<String> readMethodsFromConfiguration() {
final Set<String> set = new HashSet<String>();
final ArquillianDescriptor descriptor = desciptorInst.get();
for (final ExtensionDef def : descriptor.getExtensions()) {
if (def.getExtensionName().equalsIgnoreCase(EXTENSION_NAME)) {
final Map<String, String> properties = def.getExtensionProperties();
final String exp = properties.get(EXTENSION_PROPERTY_METHODS);
if (exp != null) {
set.addAll(Arrays.asList(exp.split(",")));
}
for (final Map.Entry<String, String> entry : properties.entrySet()) {
if (entry.getKey().startsWith(EXTENSION_PROPERTY_METHODS + "_")) {
set.add(entry.getValue());
}
}
}
}
return set;
}
示例2: getBrowser
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入方法依赖的package包/类
private String getBrowser(ArquillianDescriptor arquillianDescriptor) {
final ExtensionDef extension = arquillianDescriptor.extension("webdriver");
if (extension == null) {
return DEFAULT_BROWSER;
}
final Map<String, String> extensionProperties = extension.getExtensionProperties();
if (extensionProperties == null) {
return DEFAULT_BROWSER;
}
if (extensionProperties.containsKey("browser")) {
return extensionProperties.get("browser");
} else {
return DEFAULT_BROWSER;
}
}
示例3: getConfiguration
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入方法依赖的package包/类
private Map<String, String> getConfiguration() {
for (ExtensionDef def : descriptor.get().getExtensions()) {
if (SystemProperties.EXTENSION_NAME.equalsIgnoreCase(def
.getExtensionName())) {
return def.getExtensionProperties();
}
}
return new HashMap<String, String>();
}
示例4: overwriteDroneConfiguration
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入方法依赖的package包/类
public void overwriteDroneConfiguration(@Observes ArquillianDescriptor arquillianDescriptor) {
final List<ExtensionDef> extensions = arquillianDescriptor.getExtensions();
final ExtensionDef webdriver = arquillianDescriptor.extension("webdriver");
if (webdriver != null) {
webdriver.property("remote", "true");
final Map<String, String> extensionProperties = webdriver.getExtensionProperties();
if (!extensionProperties.containsKey("browser")) {
webdriver.property("browser", "firefox");
}
}
}