Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r29 - trunk: . src/test/java/com/artilekt/modules/jetmailer

jetmailer
Discussion topic

Back to topic list

svn commit: r29 - trunk: . src/test/java/com/artilekt/modules/jetmailer

Reply

Author volenin
Full name Vladimir Olenin
Date 2006-09-08 14:08:22 PDT
Message Author: volenin
Date: 2006-09-08 14:08:21-0700
New Revision: 29

Added:
   trunk/src/test/java/​com/artilekt/modules​/jetmailer/JiBXSeria​lizerTest.java
   trunk/src/test/java/​com/artilekt/modules​/jetmailer/message.x​ml
Modified:
   trunk/pom.xml

Log:
TemplateServiceTest fixed and updated

Modified: trunk/pom.xml
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/po​m.xml?view=diff&​rev=29&p1=trunk/​pom.xml&p2=trunk​/pom.xml&r1=28​&r2=29
====================​====================​====================​==================
--- trunk/pom.xml (original)
+++ trunk/pom.xml 2006-09-08 14:08:21-0700
@@ -142,6 +142,12 @@
       <version>2.4​</version>
     </dependency>
 
+ <dependency>
+ <groupId>xpp3​</groupId>
+ <artifactId>xp​p3</artifactId​>
+ <version>1.1.3​.3</version>
+ </dependency>
+
     <!--
         <dependency>
           <groupId>javax​.activation</grou​pId>
@@ -171,24 +177,30 @@
       <id>jibx.sf.ne​t</id>
       <name>JiBX repository</name>
       <url>http://jibx.sf.net/m​aven2</url>
+ <layout>defaul​t</layout>
       <releases>
+ <enabled>true​</enabled>
         <updatePolicy>​never</updatePoli​cy>
       </releases>
       <snapshots>
         <enabled>false​</enabled>
+ <updatePolicy>​never</updatePoli​cy>
       </snapshots>
     </repository>
   </repositories>
   <pluginRepositories>
     <pluginRepository>
+ <layout>defaul​t</layout>
       <id>jibx.sf.ne​t</id>
       <name>JiBX repository</name>
       <url>http://jibx.sf.net/m​aven2</url>
       <releases>
+ <enabled>true​</enabled>
         <updatePolicy>​never</updatePoli​cy>
       </releases>
       <snapshots>
         <enabled>false​</enabled>
+ <updatePolicy>​never</updatePoli​cy>
       </snapshots>
     </pluginRepository>
   </pluginRepositories>

Added: trunk/src/test/java/​com/artilekt/modules​/jetmailer/JiBXSeria​lizerTest.java
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/test/java/com/arti​lekt/modules/jetmail​er/JiBXSerializerTes​t.java?view=auto​&rev=29
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/test/java/​com/artilekt/modules​/jetmailer/JiBXSeria​lizerTest.java 2006-09-08 14:08:21-0700
@@ -0,0 +1,36 @@
+package com.artilekt.modules.jetmailer;
+
+import junit.framework.TestCase;
+import com.artilekt.modules​.jetmailer.model.Mes​sage;
+import com.artilekt.modules​.utils.io.PackageRes​ource;
+
+import java.io.InputStream;
+
+import org.jibx.runtime.JiBXException;
+import org.jibx.runtime.IBi​ndingFactory;
+import org.jibx.runtime.Bin​dingDirectory;
+import org.jibx.runtime.IUn​marshallingContext;
+import org.springframework.​core.io.Resource;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: volenin
+ * Date: Sep 8, 2006
+ * Time: 3:35:23 PM
+ */
+public class JiBXSerializerTest extends TestCase {
+
+ public void test() throws Exception {
+ Resource res = new PackageResource(JiBX​SerializerTest.class​, "message.xml");
+ Message msg = unmarshallMessage(re​s.getInputStream());​
+ System.out.println("Message = "+msg);
+ }
+
+
+ private Message unmarshallMessage(InputStream in) throws JiBXException {
+ IBindingFactory bfact = BindingDirectory.get​Factory(Message.clas​s);
+ IUnmarshallingContext uctx = bfact.createUnmarsha​llingContext();
+ return (Message)uctx.unmars​halDocument(in, null);
+ }
+
+}

Added: trunk/src/test/java/​com/artilekt/modules​/jetmailer/message.x​ml
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/test/java/com/arti​lekt/modules/jetmail​er/message.xml?view=​auto&rev=29
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/test/java/​com/artilekt/modules​/jetmailer/message.x​ml 2006-09-08 14:08:21-0700
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<message>
+ <from>myemail@​mydomain.com</fro​m>
+ <to>$email</to>
+ <subject>To the attention of: $name</subject>
+
+ <body>
+ Hi, $alias
+ This is a sample message. Anything can go here. Regards.
+ </body>
+
+ <attachments>
+ <attachment file="C:/MyFiles/file.doc"/>
+ <attachment file="C:/MyFiles/fil​e2.doc"/>
+ </attachments>
+</message>

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r29 - trunk: . src/test/java/com/artilekt/modules/jetmailer volenin Vladimir Olenin 2006-09-08 14:08:22 PDT
Messages per page: