axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r219449 - in /webservices/axis/trunk/java/modules/xml: project.xml test/org/apache/axis2/om/MIMEOutputUtilsTest.java
Date Mon, 18 Jul 2005 03:10:52 GMT
Author: dims
Date: Sun Jul 17 20:10:40 2005
New Revision: 219449

URL: http://svn.apache.org/viewcvs?rev=219449&view=rev
Log:
Get all MTOM tests working (please wait for the geronimo snapshots to be
uploaded, just now i checked in a patch to javamail in geronimo)


Modified:
    webservices/axis/trunk/java/modules/xml/project.xml
    webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/MIMEOutputUtilsTest.java

Modified: webservices/axis/trunk/java/modules/xml/project.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/project.xml?rev=219449&r1=219448&r2=219449&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/project.xml (original)
+++ webservices/axis/trunk/java/modules/xml/project.xml Sun Jul 17 20:10:40 2005
@@ -32,11 +32,6 @@
 
         <unitTest>
             <excludes>
-                <exclude>**/*OMOutputTest.java</exclude>
-                <exclude>**/*MTOMStAXSOAPModelBuilderTest.java</exclude>
-                <exclude>**/*ImageSampleTest.java</exclude>
-                <exclude>**/*MIMEHelperTest.java</exclude>
-                <exclude>**/*MIMEOutputUtilsTest.java</exclude>
             </excludes>
             <includes>
                 <include>**/*Test.java</include>

Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/MIMEOutputUtilsTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/MIMEOutputUtilsTest.java?rev=219449&r1=219448&r2=219449&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/MIMEOutputUtilsTest.java
(original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/MIMEOutputUtilsTest.java
Sun Jul 17 20:10:40 2005
@@ -49,14 +49,17 @@
         DataHandler dataHandler;
         dataHandler = new DataHandler(new ByteArrayDataSource(byteArray));
         OMText textData = factory.createText(dataHandler, true);
+        assertNotNull(textData.getContentID());
 
         DataHandler dataHandler2 = new DataHandler(
                 "Apache Software Foundation", "text/plain");
         OMText text = factory.createText(dataHandler2, true);
+        assertNotNull(text.getContentID());
         outStream = new ByteArrayOutputStream();
         outStream.write(("Content-Type: " + contentType).getBytes());
-        outStream.write(new byte[]{13, 10});
-        //outStream.write("\n\n".getBytes());
+        outStream.write(new byte[]{13,10});
+        outStream.write(new byte[]{13,10});
+
         MIMEOutputUtils.startWritingMime(outStream, boundary);
         MimeBodyPart part1 = MIMEOutputUtils.createMimeBodyPart(textData);
         MIMEOutputUtils.writeBodyPart(outStream, part1, boundary);
@@ -65,7 +68,6 @@
         MIMEOutputUtils.finishWritingMime(outStream);
         buffer = outStream.toByteArray();
         System.out.println(new String(buffer));
-        System.out.println("Axis2");
     }
 
     public void testMIMEWriting() throws IOException, MessagingException {
@@ -75,13 +77,13 @@
                 .getInstance(props, null);
         MimeMessage mimeMessage = new MimeMessage(session, inStream);
         DataHandler dh = mimeMessage.getDataHandler();
-        MimeMultipart multiPart = new MimeMultipart(
-                (MimePartDataSource) dh
-                .getDataSource());
-        MimeBodyPart mimeBodyPart2 = (MimeBodyPart) multiPart.getBodyPart(0);
-        Object object = mimeBodyPart2.getContent();
-        MimeBodyPart mimeBodyPart1 = (MimeBodyPart) multiPart.getBodyPart(0);
-
+        MimeMultipart multiPart = new MimeMultipart(dh.getDataSource());
+        MimeBodyPart mimeBodyPart0 = (MimeBodyPart) multiPart.getBodyPart(0);
+        Object object0 = mimeBodyPart0.getContent();
+        assertNotNull(object0);
+        MimeBodyPart mimeBodyPart1 = (MimeBodyPart) multiPart.getBodyPart(1);
+        Object object1 = mimeBodyPart1.getContent();
+        assertNotNull(object1);
+        assertEquals(multiPart.getCount(),2);
     }
-
 }



Mime
View raw message