@Override public FundamentalTestConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { return ConfigurationMapper.fromArquillianDescriptor(descriptor, this, qualifier); }
@Override public ArquillianGrapheneConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { ConfigurationMapper.fromArquillianDescriptor(descriptor, this, qualifier); return ConfigurationMapper.fromSystemConfiguration(this, qualifier); }
static <T extends DroneConfiguration<T>> Field injectField(T configuration, List<Field> maps, Map<String, Field> fields, String fieldName, String value) { try { Field f = fields.get(fieldName); if (f.getAnnotation(Deprecated.class) != null) { log.log(Level.WARNING, "The property \"{0}\" used in Arquillian \"{1}\" configuration is deprecated.", new Object[] {f.getName(), configuration.getConfigurationName()}); } // remap the property into capability if this is a legacy one // or remap the property into different property field if (LegacyConfigurationMapper.isLegacy(fieldName)) { String newKey = LegacyConfigurationMapper.remapKey(fieldName); String newValue = LegacyConfigurationMapper.remapValue(fieldName, value); if (LegacyConfigurationMapper.remapsToCapability(fieldName)) { injectMapProperty(configuration, maps, fields, newKey, newValue); } else { injectField(configuration, maps, fields, newKey, newValue); } } f.set(configuration, convert(f.getType(), value)); return f; } catch (Exception e) { throw new RuntimeException( "Could not map Drone configuration(" + configuration.getConfigurationName() + ") for " + configuration.getClass().getName() + " from Arquillian Descriptor", e); } }
String name = nameValue.getKey(); String reversedName = keyTransformReverse(name); injectField(configuration, maps, fields, name, nameValue.getValue()); new Object[] {name, configuration.getConfigurationName(), keyTransformReverse(name)}); injectField(configuration, maps, fields, keyTransformReverse(name), nameValue.getValue()); injectMapProperty(configuration, maps, fields, name, nameValue.getValue());
static <T extends DroneConfiguration<T>> Field injectField(T configuration, List<Field> maps, Map<String, Field> fields, String fieldName, String value) { try { Field f = fields.get(fieldName); if (f.getAnnotation(Deprecated.class) != null) { log.log(Level.WARNING, "The property \"{0}\" used in Arquillian \"{1}\" configuration is deprecated.", new Object[] {f.getName(), configuration.getConfigurationName()}); } // remap the property into capability if this is a legacy one // or remap the property into different property field if (LegacyConfigurationMapper.isLegacy(fieldName)) { String newKey = LegacyConfigurationMapper.remapKey(fieldName); String newValue = LegacyConfigurationMapper.remapValue(fieldName, value); if (LegacyConfigurationMapper.remapsToCapability(fieldName)) { injectMapProperty(configuration, maps, fields, newKey, newValue); } else { injectField(configuration, maps, fields, newKey, newValue); } } f.set(configuration, convert(f.getType(), value)); return f; } catch (Exception e) { throw new RuntimeException( "Could not map Drone configuration(" + configuration.getConfigurationName() + ") for " + configuration.getClass().getName() + " from Arquillian Descriptor", e); } }
String name = nameValue.getKey(); String reversedName = keyTransformReverse(name); injectField(configuration, maps, fields, name, nameValue.getValue()); new Object[] {name, configuration.getConfigurationName(), keyTransformReverse(name)}); injectField(configuration, maps, fields, keyTransformReverse(name), nameValue.getValue()); injectMapProperty(configuration, maps, fields, name, nameValue.getValue());
@Override public GrapheneConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { return ConfigurationMapper.fromArquillianDescriptor(descriptor, this, qualifier); }
public SeleniumConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { ConfigurationMapper.fromArquillianDescriptor(descriptor, this, qualifier); return ConfigurationMapper.fromSystemConfiguration(this, qualifier); }
@SuppressWarnings("deprecation") @Override public RichFacesPageFragmentsConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { return ConfigurationMapper.fromArquillianDescriptor(descriptor, this, qualifier); }
@Override public GrapheneConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { return ConfigurationMapper.fromArquillianDescriptor(descriptor, this, qualifier); }
public SeleniumServerConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { return ConfigurationMapper.fromArquillianDescriptor(descriptor, this, qualifier); }
@Override public WebDriverConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { ConfigurationMapper.fromArquillianDescriptor(descriptor, this, qualifier); // ARQ-1022, we need to check if we haven't overriden original browser // capabilities in an incompatible way if (_originalBrowser != null && !_originalBrowser.equals(this.browser)) { log.log(Level.WARNING, "Arquillian configuration is specifying a Drone of type {0}, however test class specifically asked for {1}. As Drone cannot guarantee that those two are compatible, \"browser\" property will be set to {1}.", new Object[] {browser, _originalBrowser}); this.browser = _originalBrowser; } return this; }
@Override public WebDriverConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { ConfigurationMapper.fromArquillianDescriptor(descriptor, this, qualifier); // ARQ-1022, we need to check if we haven't overriden original browser // capabilities in an incompatible way if (_originalBrowser != null && !_originalBrowser.equals(this.browser)) { log.log(Level.WARNING, "Arquillian configuration is specifying a Drone of type {0}, however test class specifically asked for {1}. As Drone cannot guarantee that those two are compatible, \"browser\" property will be set to {1}.", new Object[] {browser, _originalBrowser}); this.browser = _originalBrowser; } return this; }
@Override public GlobalDroneConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { // qualifier is ignored ConfigurationMapper.fromArquillianDescriptor(descriptor, this, Default.class); // if debugging is enabled if (Boolean.parseBoolean(SecurityActions.getProperty("arquillian.debug"))) { this.instantiationTimeoutInSeconds = 0; } return this; }
@Override public GlobalDroneConfiguration configure(ArquillianDescriptor descriptor, Class<? extends Annotation> qualifier) { // qualifier is ignored ConfigurationMapper.fromArquillianDescriptor(descriptor, this, Default.class); // if debugging is enabled if (Boolean.parseBoolean(SecurityActions.getProperty("arquillian.debug"))) { this.instantiationTimeoutInSeconds = 0; } return this; }