Package org.dom4j

Examples of org.dom4j.Element.attributeCount()


        Assert.assertEquals(connectorElement.elements("post-processing-actions").size(), 1);
        Element postProcessingActionsElement = connectorElement.element("post-processing-actions");

        Assert.assertEquals(postProcessingActionsElement.elements("action").size(), 1);
        Element postProcessingActionElement = postProcessingActionsElement.element("action");
        Assert.assertEquals(postProcessingActionElement.attributeCount(), 1);
        Assert.assertEquals(postProcessingActionElement.attributeValue("className"), "org.mokai.types.mock.MockConfigurableAction");
        validateProperties(postProcessingActionElement, "test1", "1");

        // validate post-receiving-actions
        Assert.assertEquals(connectorElement.elements("post-receiving-actions").size(), 1);
View Full Code Here


        Assert.assertEquals(connectorElement.elements("post-receiving-actions").size(), 1);
        Element postReceivingActionsElement = connectorElement.element("post-receiving-actions");

        Assert.assertEquals(postReceivingActionsElement.elements("action").size(), 1);
        Element postReceivingActionElement = postReceivingActionsElement.element("action");
        Assert.assertEquals(postReceivingActionElement.attributeCount(), 1);
        Assert.assertEquals(postReceivingActionElement.attributeValue("className"), "org.mokai.types.mock.MockConfigurableAction");
        validateProperties(postReceivingActionElement, "test1", "1");
      }

    }.validate();
View Full Code Here

    // validate connector properties
    Assert.assertEquals(parentElement.elements("property").size(), 2);
    Iterator connectorProperties = parentElement.elements("property").iterator();
    while (connectorProperties.hasNext()) {
      Element propertyElement = (Element) connectorProperties.next();
      Assert.assertEquals(propertyElement.attributeCount(), 1);

      String propertyName = propertyElement.attributeValue("name");
      String propertyValue = propertyElement.getText();
      Assert.assertTrue(propertyName.equals("config1") || propertyName.equals("config2"));
      Assert.assertTrue(propertyValue.equals(config1) || propertyValue.equals(config2));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.