Examples of numberValueOf()


Examples of ca.ecliptical.emf.xpath.EMFDOMXPath.numberValueOf()

    assertEquals("Writer 2", result);
  }

  public final void testSum() throws Exception {
    EMFDOMXPath xpath = new EMFDOMXPath("sum(books/@pages)");
    Number result = xpath.numberValueOf(fixture);
    assertNotNull(result);
    assertEquals(6000, result.intValue());
  }
}
View Full Code Here

Examples of ca.ecliptical.emf.xpath.EMFXPath.numberValueOf()

  }
 
  public final void testSum() throws Exception {
    EMFXPath xpath = new EMFXPath("sum(lib:books/lib:pages)");
    xpath.addNamespace("lib", LibraryPackage.eNS_URI);
    Number result = xpath.numberValueOf(fixture);
    assertNotNull(result);
    assertEquals(6000, result.intValue());
  }
 
  public final void testFeatureMap() throws Exception {
View Full Code Here

Examples of org.dom4j.Element.numberValueOf()

    public void testConfigurationDefaults()
    {
        Element configurationType = (Element) schema.selectSingleNode("/xsd:schema/xsd:complexType[@name='configurationType']");

        assertEquals(muleContext.getConfiguration().getDefaultResponseTimeout(),
            configurationType.numberValueOf("xsd:attribute[@name='defaultResponseTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().getDefaultTransactionTimeout(),
            configurationType.numberValueOf("xsd:attribute[@name='defaultTransactionTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().getShutdownTimeout(),
View Full Code Here

Examples of org.dom4j.Element.numberValueOf()

        assertEquals(muleContext.getConfiguration().getDefaultResponseTimeout(),
            configurationType.numberValueOf("xsd:attribute[@name='defaultResponseTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().getDefaultTransactionTimeout(),
            configurationType.numberValueOf("xsd:attribute[@name='defaultTransactionTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().getShutdownTimeout(),
            configurationType.numberValueOf("xsd:attribute[@name='shutdownTimeout']/@default")
                .intValue());
    }
View Full Code Here

Examples of org.dom4j.Element.numberValueOf()

                .intValue());
        assertEquals(muleContext.getConfiguration().getDefaultTransactionTimeout(),
            configurationType.numberValueOf("xsd:attribute[@name='defaultTransactionTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().getShutdownTimeout(),
            configurationType.numberValueOf("xsd:attribute[@name='shutdownTimeout']/@default")
                .intValue());
    }
}
View Full Code Here

Examples of org.dom4j.Element.numberValueOf()

    public void testConfigurationDefaults()
    {
        Element configurationType = (Element) schema.selectSingleNode("/xsd:schema/xsd:complexType[@name='configurationType']");

        assertEquals(muleContext.getConfiguration().getDefaultResponseTimeout(),
            configurationType.numberValueOf("xsd:complexContent/xsd:extension/xsd:attribute[@name='defaultResponseTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().getDefaultTransactionTimeout(),
            configurationType.numberValueOf("xsd:complexContent/xsd:extension/xsd:attribute[@name='defaultTransactionTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().getShutdownTimeout(),
View Full Code Here

Examples of org.dom4j.Element.numberValueOf()

        assertEquals(muleContext.getConfiguration().getDefaultResponseTimeout(),
            configurationType.numberValueOf("xsd:complexContent/xsd:extension/xsd:attribute[@name='defaultResponseTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().getDefaultTransactionTimeout(),
            configurationType.numberValueOf("xsd:complexContent/xsd:extension/xsd:attribute[@name='defaultTransactionTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().getShutdownTimeout(),
            configurationType.numberValueOf("xsd:complexContent/xsd:extension/xsd:attribute[@name='shutdownTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().useExtendedTransformations(), Boolean.parseBoolean(
View Full Code Here

Examples of org.dom4j.Element.numberValueOf()

                .intValue());
        assertEquals(muleContext.getConfiguration().getDefaultTransactionTimeout(),
            configurationType.numberValueOf("xsd:complexContent/xsd:extension/xsd:attribute[@name='defaultTransactionTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().getShutdownTimeout(),
            configurationType.numberValueOf("xsd:complexContent/xsd:extension/xsd:attribute[@name='shutdownTimeout']/@default")
                .intValue());
        assertEquals(muleContext.getConfiguration().useExtendedTransformations(), Boolean.parseBoolean(
                     configurationType.valueOf("xsd:complexContent/xsd:extension/xsd:attribute[@name='useExtendedTransformations']/@default")));
        assertEquals(muleContext.getConfiguration().isFlowEndingWithOneWayEndpointReturnsNull(), Boolean.parseBoolean(
                configurationType.valueOf("xsd:complexContent/xsd:extension/xsd:attribute[@name='flowEndingWithOneWayEndpointReturnsNull']/@default")));
View Full Code Here

Examples of org.dom4j.XPath.numberValueOf()

    // -------------------------------------------------------------------------
    protected void testXPath(Node node, String xpathText) throws Exception {
        try {
            XPath xpath = node.createXPath(xpathText);

            Number number = xpath.numberValueOf(node);

            log("Searched path: " + xpathText + " found: " + number);
        } catch (Throwable e) {
            log("Caught exception: " + e);
            e.printStackTrace();
View Full Code Here

Examples of org.dom4j.XPath.numberValueOf()

    }

    public Number numberValueOf(String xpathExpression) {
        XPath xpath = createXPath(xpathExpression);

        return xpath.numberValueOf(this);
    }

    public boolean matches(String patternText) {
        NodeFilter filter = createXPathFilter(patternText);
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.