axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r740332 - /webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
Date Tue, 03 Feb 2009 16:13:03 GMT
Author: veithen
Date: Tue Feb  3 16:13:02 2009
New Revision: 740332

URL: http://svn.apache.org/viewvc?rev=740332&view=rev
Log:
Removed testMultipleAttachments2 which is an exact duplicate of testMultipleAttachments.

Modified:
    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java

Modified: webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java?rev=740332&r1=740331&r2=740332&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
Tue Feb  3 16:13:02 2009
@@ -111,38 +111,6 @@
         assertTrue(nAttachments == 2);
     }
 
-    @Validated @Test
-    public void testMultipleAttachments2() throws Exception {
-        MessageFactory factory = MessageFactory.newInstance();
-        SOAPMessage msg = factory.createMessage();
-        java.net.URL url1 = new java.net.URL("http://www.apache.org/licenses/LICENSE-2.0.html");
-        java.net.URL url2 = new java.net.URL("http://www.apache.org/licenses/LICENSE-2.0.txt");
-
-        AttachmentPart a1 = msg.createAttachmentPart(new javax.activation.DataHandler(url1));
-        a1.setContentType("text/xml");
-        msg.addAttachmentPart(a1);
-        AttachmentPart a2 = msg.createAttachmentPart(new javax.activation.DataHandler(url1));
-        a2.setContentType("text/xml");
-        msg.addAttachmentPart(a2);
-        AttachmentPart a3 = msg.createAttachmentPart(new javax.activation.DataHandler(url2));
-        a3.setContentType("text/plain");
-        msg.addAttachmentPart(a3);
-
-        assertTrue(msg.countAttachments() == 3);
-
-        javax.xml.soap.MimeHeaders mimeHeaders = new javax.xml.soap.MimeHeaders();
-        mimeHeaders.addHeader("Content-Type", "text/xml");
-
-        int nAttachments = 0;
-        java.util.Iterator iterator = msg.getAttachments(mimeHeaders);
-        while (iterator.hasNext()) {
-            nAttachments++;
-            AttachmentPart ap = (AttachmentPart)iterator.next();
-            assertTrue(ap.equals(a1) || ap.equals(a2));
-        }
-        assertTrue(nAttachments == 2);
-    }
-
     // Note: This test case fails with Sun's SAAJ implementation
     //       and can't be @Validated.
     @Test



Mime
View raw message