Author: rdonkin
Date: Sat Jul 26 13:20:00 2008
New Revision: 680038
URL: http://svn.apache.org/viewvc?rev=680038&view=rev
Log:
Test scripts for more advanced structure stuff
Added:
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchStructureComplex.test
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchStructureEmbedded.test
Modified:
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
Modified:
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java?rev=680038&r1=680037&r2=680038&view=diff
==============================================================================
---
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
(original)
+++
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
Sat Jul 26 13:20:00 2008
@@ -35,7 +35,83 @@
public static final void main(String[] args) throws Exception {
ScriptBuilder builder = ScriptBuilder.open("localhost", 143);
- bodyStructureMultipart(builder);
+ bodyStructureEmbedded(builder);
+ }
+
+ public static void bodyStructureEmbedded(ScriptBuilder builder) throws
Exception {
+ builder.login();
+ builder.create();
+ builder.select();
+ builder.setFile("multipart-mixed-complex.mail");
+ builder.append();
+ builder.fetchSection("");
+ builder.fetchSection("TEXT");
+ builder.fetchSection("HEADER");
+ builder.fetchSection("1");
+ builder.fetchSection("2");
+ builder.fetchSection("3");
+ builder.fetchSection("3.HEADER");
+ builder.fetchSection("3.TEXT");
+ builder.fetchSection("3.1");
+ builder.fetchSection("3.2");
+ builder.fetchSection("4");
+ builder.fetchSection("4.1");
+ builder.fetchSection("4.1.MIME");
+ builder.fetchSection("4.2");
+ builder.fetchSection("4.2.HEADER");
+ builder.fetchSection("4.2.TEXT");
+ builder.fetchSection("4.2.1");
+ builder.fetchSection("4.2.2");
+ builder.fetchSection("4.2.2.1");
+ builder.fetchSection("4.2.2.2");
+ builder.resetFetch().setBodyFetch(true).setBodyStructureFetch(true);
+ builder.fetchAllMessages();
+ builder.quit();
+ }
+
+ public static void bodyStructureComplex(ScriptBuilder builder) throws
Exception {
+ builder.login();
+ builder.create();
+ builder.select();
+ builder.setFile("wild-alt-reply3.mail");
+ builder.append();
+ builder.setFile("wild-alt-reply4.mail");
+ builder.append();
+ builder.setFile("multipart-mixed.mail");
+ builder.append();
+ builder.setFile("wild-mixed-alt.mail");
+ builder.append();
+ builder.setFile("wild-mixed.mail");
+ builder.append();
+ builder.setFile("mime-plain-text.mail");
+ builder.append();
+ builder.fetchAllMessages();
+ for (int i=1;i<7;i++) {
+ builder.setMessageNumber(i);
+ builder.fetchSection("");
+ builder.fetchSection("TEXT");
+ builder.fetchSection("HEADER");
+ builder.fetchSection("1");
+ builder.fetchSection("2");
+ builder.fetchSection("3");
+ builder.fetchSection("3.HEADER");
+ builder.fetchSection("3.TEXT");
+ builder.fetchSection("3.1");
+ builder.fetchSection("3.2");
+ builder.fetchSection("4");
+ builder.fetchSection("4.1");
+ builder.fetchSection("4.1.MIME");
+ builder.fetchSection("4.2");
+ builder.fetchSection("4.2.HEADER");
+ builder.fetchSection("4.2.TEXT");
+ builder.fetchSection("4.2.1");
+ builder.fetchSection("4.2.2");
+ builder.fetchSection("4.2.2.1");
+ builder.fetchSection("4.2.2.2");
+ }
+ builder.resetFetch().setBodyFetch(true).setBodyStructureFetch(true);
+ builder.fetchAllMessages();
+ builder.quit();
}
public static void bodyStructureSimple(ScriptBuilder builder) throws
Exception {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]