Examples of attributeCount()


Examples of org.dom4j.Element.attributeCount()

        Assert.assertEquals(connectorElement.elements("acceptors").size(), 1);
        Element acceptorsElement = connectorElement.element("acceptors");

        Assert.assertEquals(acceptorsElement.elements("acceptor").size(), 1);
        Element acceptorElement = acceptorsElement.element("acceptor");
        Assert.assertEquals(acceptorElement.attributeCount(), 1);
        Assert.assertEquals(acceptorElement.attributeValue("className"), "org.mokai.types.mock.MockConfigurableAcceptor");
        validateProperties(acceptorElement, "test1", "1");

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

Examples of org.dom4j.Element.attributeCount()

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

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

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

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

Examples of org.dom4j.Element.attributeCount()

        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

Examples of org.dom4j.Element.attributeCount()

    // 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

Examples of org.fest.swing.junit.xml.XmlNode.attributeCount()

    assertThat(output.toByteArray()).isEmpty();
  }

  private void assertThatStatisticsWereAddedToXml() {
    XmlNode root = root();
    assertThat(root.attributeCount()).isEqualTo(7);
    assertThat(root.valueOfAttribute("errors")).isEqualTo("6");
    assertThat(root.valueOfAttribute("failures")).isEqualTo("8");
    assertThat(root.valueOfAttribute("tests")).isEqualTo("18");
    double time = parseDouble(root.valueOfAttribute("time"));
    assertThat(time).isGreaterThanOrEqualTo(0d);
View Full Code Here

Examples of org.fest.swing.junit.xml.XmlNode.attributeCount()

  @Test
  public void should_write_suite_and_environment_info() {
    formatter.startTestSuite(suite);
    XmlNode root = root();
    assertThat(root.attributeCount()).isEqualTo(3);
    assertThatSuiteAndEnvironmentInfoWereAddedTo(root);
    assertThatThereAreNoPropertiesIn(root);
  }

  @Test
View Full Code Here

Examples of org.fest.swing.junit.xml.XmlNode.attributeCount()

  void onSetUp() {}

  static void assertThatThereAreNoPropertiesIn(XmlNode root) {
    XmlNode properties = root.child(0);
    assertThat(properties.attributeCount()).isEqualTo(0);
    assertThat(properties.size()).isEqualTo(0);
  }

  static void assertThatSuiteAndEnvironmentInfoWereAddedTo(XmlNode root) {
    assertThat(root.valueOfAttribute("hostname")).isEqualTo(localHostName());
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.