Package org.apache.axiom.testutils.concurrent

Examples of org.apache.axiom.testutils.concurrent.Action


        super(staxImpl);
    }

    protected void runTest() throws Throwable {
        final XMLInputFactory factory = staxImpl.getDialect().makeThreadSafe(staxImpl.newNormalizedXMLInputFactory());
        ConcurrentTestUtils.testThreadSafety(new Action() {
            public void execute() throws Exception {
                String text = String.valueOf((int)(Math.random() * 10000));
                String xml = "<root>" + text + "</root>";
                XMLStreamReader reader = factory.createXMLStreamReader(new StringReader(xml));
                assertEquals(XMLStreamReader.START_DOCUMENT, reader.getEventType());
View Full Code Here


        super(staxImpl);
    }

    protected void runTest() throws Throwable {
        final XMLOutputFactory factory = staxImpl.getDialect().makeThreadSafe(staxImpl.newNormalizedXMLOutputFactory());
        ConcurrentTestUtils.testThreadSafety(new Action() {
            public void execute() throws Exception {
                String text = String.valueOf((int)(Math.random() * 10000));
                StringWriter out = new StringWriter();
                XMLStreamWriter writer = factory.createXMLStreamWriter(out);
                writer.writeStartElement("root");
View Full Code Here

import org.apache.axiom.testutils.concurrent.ConcurrentTestUtils;

public class CreateXMLStreamWriterThreadSafetyTestCase extends DialectTestCase {
    protected void runTest() throws Throwable {
        final XMLOutputFactory factory = getDialect().makeThreadSafe(newNormalizedXMLOutputFactory());
        ConcurrentTestUtils.testThreadSafety(new Action() {
            public void execute() throws Exception {
                String text = String.valueOf((int)(Math.random() * 10000));
                StringWriter out = new StringWriter();
                XMLStreamWriter writer = factory.createXMLStreamWriter(out);
                writer.writeStartElement("root");
View Full Code Here

import org.apache.axiom.testutils.concurrent.ConcurrentTestUtils;

public class CreateXMLStreamReaderThreadSafetyTestCase extends DialectTestCase {
    protected void runTest() throws Throwable {
        final XMLInputFactory factory = getDialect().makeThreadSafe(newNormalizedXMLInputFactory());
        ConcurrentTestUtils.testThreadSafety(new Action() {
            public void execute() throws Exception {
                String text = String.valueOf((int)(Math.random() * 10000));
                String xml = "<root>" + text + "</root>";
                XMLStreamReader reader = factory.createXMLStreamReader(new StringReader(xml));
                assertEquals(XMLStreamReader.START_DOCUMENT, reader.getEventType());
View Full Code Here

TOP

Related Classes of org.apache.axiom.testutils.concurrent.Action

Copyright © 2018 www.massapicom. 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.