servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r749260 - in /servicemix/components/shared-libraries/trunk/servicemix-soap2/src/test/java/org/apache/servicemix/soap/util: ./ stax/ stax/StaxUtilTest.java
Date Mon, 02 Mar 2009 10:21:22 GMT
Author: gertv
Date: Mon Mar  2 10:21:22 2009
New Revision: 749260

URL: http://svn.apache.org/viewvc?rev=749260&view=rev
Log:
SMXCOMP-468: Jms Consumer to Provider failure -- adding unit tests to trunk

Added:
    servicemix/components/shared-libraries/trunk/servicemix-soap2/src/test/java/org/apache/servicemix/soap/util/
    servicemix/components/shared-libraries/trunk/servicemix-soap2/src/test/java/org/apache/servicemix/soap/util/stax/
    servicemix/components/shared-libraries/trunk/servicemix-soap2/src/test/java/org/apache/servicemix/soap/util/stax/StaxUtilTest.java
  (with props)

Added: servicemix/components/shared-libraries/trunk/servicemix-soap2/src/test/java/org/apache/servicemix/soap/util/stax/StaxUtilTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-soap2/src/test/java/org/apache/servicemix/soap/util/stax/StaxUtilTest.java?rev=749260&view=auto
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-soap2/src/test/java/org/apache/servicemix/soap/util/stax/StaxUtilTest.java
(added)
+++ servicemix/components/shared-libraries/trunk/servicemix-soap2/src/test/java/org/apache/servicemix/soap/util/stax/StaxUtilTest.java
Mon Mar  2 10:21:22 2009
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.soap.util.stax;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import junit.framework.TestCase;
+
+/**
+ * Test cases for {@link StaxUtil}
+ */
+public class StaxUtilTest extends TestCase {
+    
+    private static final InputStream MESSAGE = new ByteArrayInputStream("<test>my message</test>".getBytes());
+
+    public void testCreateReaderForStaxSource() throws Exception {
+        XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(MESSAGE);

+        StaxSource source = new StaxSource(reader);
+        assertSame(reader, StaxUtil.createReader(source));
+    }
+}

Propchange: servicemix/components/shared-libraries/trunk/servicemix-soap2/src/test/java/org/apache/servicemix/soap/util/stax/StaxUtilTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message