/**
* Test for a HorizontalRuleEmulatorWithBorderStylingOnDIV when the
* hr is not supported but the div is fully supported
*/
public void testFactoryHRMultipleDivStyling() {
HorizontalRuleEmulatorFactory factory =
getHREmulatorFactory();
ProtocolConfigurationImpl config = new ProtocolConfigurationImpl();
HashMap policies = new HashMap();
policies.put(DeviceCapabilityConstants.HR_SUPPORTED, "none");
policies.put(DeviceCapabilityConstants.DIV_SUPPORTED, "partial");
policies.put(DeviceCapabilityConstants.DIV_BORDER_TOP_COLOR, "full");
policies.put(DeviceCapabilityConstants.DIV_BORDER_TOP_WIDTH, "full");
policies.put(DeviceCapabilityConstants.DIV_BORDER_BOTTOM_COLOR, "none");
policies.put(DeviceCapabilityConstants.DIV_BORDER_BOTTOM_WIDTH, "none");
policies.put(DeviceCapabilityConstants.DIV_MARGIN_BOTTOM, "partial");
policies.put(DeviceCapabilityConstants.DIV_MARGIN_TOP, "partial");
InternalDevice device = INTERNAL_DEVICE_FACTORY.createInternalDevice(
new DefaultDevice("device", policies, null));
device.setProtocolConfiguration(config);
DeviceCapabilityManagerBuilder builder =
new DeviceCapabilityManagerBuilder(device);
config.setDeviceCapabilityManager(builder.build());
HorizontalRuleAttributes attrs = getHRAttributes(
"margin-bottom: 5px; margin-top: 5px; text-align: left");
HorizontalRuleEmulator emulator = factory.getEmulator(device, attrs,
true);
assertNotNull("emulator should not be null", emulator);
assertTrue("emulator was instnace of"+emulator.getClass().getName()+