Search in sources :

Example 6 with Definition

use of com.gargoylesoftware.htmlunit.css.StyleAttributes.Definition in project htmlunit by HtmlUnit.

the class StyleAttributesTest method unique.

/**
 * Test the uniqueness of the property names.
 */
@Test
public void unique() {
    final List<String> nameList = new ArrayList<>();
    for (final Definition definition : StyleAttributes.Definition.values()) {
        final String propertyName = definition.getPropertyName();
        if (nameList.contains(propertyName)) {
            fail("StyleAttributes.Definition: the property name '" + propertyName + "' is defined more than once");
        }
        nameList.add(propertyName);
    }
}
Also used : ArrayList(java.util.ArrayList) Definition(com.gargoylesoftware.htmlunit.css.StyleAttributes.Definition) Test(org.junit.Test)

Aggregations

Definition (com.gargoylesoftware.htmlunit.css.StyleAttributes.Definition)6 ArrayList (java.util.ArrayList)3 Test (org.junit.Test)3 HtmlUnitScriptable (com.gargoylesoftware.htmlunit.javascript.HtmlUnitScriptable)2 Scriptable (net.sourceforge.htmlunit.corejs.javascript.Scriptable)2 BrowserVersion (com.gargoylesoftware.htmlunit.BrowserVersion)1 ClassConfiguration (com.gargoylesoftware.htmlunit.javascript.configuration.ClassConfiguration)1 PropertyInfo (com.gargoylesoftware.htmlunit.javascript.configuration.ClassConfiguration.PropertyInfo)1