You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by di...@apache.org on 2008/04/08 02:43:12 UTC
svn commit: r645745 - in
/webservices/commons/trunk/modules/axiom/modules/axiom-tests: pom.xml
src/test/java/org/apache/axiom/om/MIMEOutputUtilsTest.java
Author: dims
Date: Mon Apr 7 17:43:11 2008
New Revision: 645745
URL: http://svn.apache.org/viewvc?rev=645745&view=rev
Log:
enable javax.mail only for the tests, reenable the commented out test
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/MIMEOutputUtilsTest.java
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml?rev=645745&r1=645744&r2=645745&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml Mon Apr 7 17:43:11 2008
@@ -43,24 +43,43 @@
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>${axiom.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-javamail_1.4_spec</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId>
<version>${axiom.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-javamail_1.4_spec</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-dom</artifactId>
<version>${axiom.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-javamail_1.4_spec</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-activation_1.1_spec</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-javamail_1.4_spec</artifactId>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4</version>
</dependency>
<dependency>
<groupId>jaxen</groupId>
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/MIMEOutputUtilsTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/MIMEOutputUtilsTest.java?rev=645745&r1=645744&r2=645745&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/MIMEOutputUtilsTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/MIMEOutputUtilsTest.java Mon Apr 7 17:43:11 2008
@@ -75,23 +75,22 @@
buffer = outStream.toByteArray();
}
- // FIXME: Works with javax.mail but not with geronimo javamail jars.
-// public void testMIMEWriting() throws IOException, MessagingException {
-// ByteArrayInputStream inStream = new ByteArrayInputStream(buffer);
-// Properties props = new Properties();
-// javax.mail.Session session = javax.mail.Session
-// .getInstance(props, null);
-// MimeMessage mimeMessage = new MimeMessage(session, inStream);
-// DataHandler dh = mimeMessage.getDataHandler();
-// 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);
-// }
+ public void testMIMEWriting() throws IOException, MessagingException {
+ ByteArrayInputStream inStream = new ByteArrayInputStream(buffer);
+ Properties props = new Properties();
+ javax.mail.Session session = javax.mail.Session
+ .getInstance(props, null);
+ MimeMessage mimeMessage = new MimeMessage(session, inStream);
+ DataHandler dh = mimeMessage.getDataHandler();
+ 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);
+ }
public void testWriteSOAPWithAttachmentsMessage() throws IOException {
// ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org