You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2010/03/16 18:55:30 UTC

svn commit: r923904 [1/4] - in /james/imap/trunk: ./ api/ api/src/test/java/org/apache/james/imap/api/message/response/ decode/ decode/src/test/java/org/apache/james/imap/decode/parser/ deployment/src/test/java/org/apache/james/imap/functional/ deploym...

Author: norman
Date: Tue Mar 16 17:55:28 2010
New Revision: 923904

URL: http://svn.apache.org/viewvc?rev=923904&view=rev
Log:
Use Junit4 and add junit tests for JCR implementation. Not all Tests pass atm (IMAP-93) and (IMAP-117)

Added:
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/AuthenticatedStateTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/ConcurrentSessionsTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/EventTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/ExpungeTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchBodySectionTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchBodyStructureTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchHeadersTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/NonAuthenticatedStateTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/PartialFetchTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/RenameTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/SearchTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/SecurityTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/SelectTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/SelectedInboxTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/SelectedStateTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/UidSearchTest.java
Modified:
    james/imap/trunk/api/pom.xml
    james/imap/trunk/api/src/test/java/org/apache/james/imap/api/message/response/AbstractTestForStatusResponseFactory.java
    james/imap/trunk/api/src/test/java/org/apache/james/imap/api/message/response/StatusResponseTest.java
    james/imap/trunk/decode/pom.xml
    james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/FetchCommandParserPartialFetchTest.java
    james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserAndParenthesesTest.java
    james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserCharsetTest.java
    james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserNotTest.java
    james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserOrTest.java
    james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserQuotedCharsetTest.java
    james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserSearchKeySequenceSetTest.java
    james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserSearchKeyTest.java
    james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserTopLevelAndTest.java
    james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/StoreCommandParserTest.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/ImapHostSystem.java
    james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/JCRHostSystem.java
    james/imap/trunk/deployment/src/test/resources/log4j.properties
    james/imap/trunk/deployment/src/test/resources/test-repository.xml
    james/imap/trunk/mailbox/src/test/java/org/apache/james/imap/mailbox/util/MailboxEventDispatcherFlagsTest.java
    james/imap/trunk/message/pom.xml
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/AbstractTestImapResponseComposer.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/EncoderUtilsDateTimeLocaleTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/EncoderUtilsTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/FetchResponseEncoderEnvelopeTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/FetchResponseEncoderNoExtensionsTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/FetchResponseEncoderTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/ImapResponseTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/LSubResponseEncoderTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/ListResponseEncoderTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/ListingEncodingUtilsTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/MailboxStatusResponseEncoderTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/NamespaceResponseEncoderTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/SearchResponseEncoderTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/StatusResponseEncoderTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/base/ImapResponseComposerImplTest.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/message/response/UnpooledStatusResponseFactoryTest.java
    james/imap/trunk/parent/pom.xml
    james/imap/trunk/pom.xml
    james/imap/trunk/processor/pom.xml
    james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/LSubProcessorTest.java
    james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/ListProcessorTest.java
    james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java
    james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/SearchProcessorTest.java
    james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java
    james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/fetch/PartialFetchBodyElementTest.java
    james/imap/trunk/protocol-tester/src/main/java/org/apache/james/test/functional/AbstractProtocolTestFramework.java
    james/imap/trunk/protocol-tester/src/main/java/org/apache/james/test/functional/AbstractSimpleScriptedTestProtocol.java
    james/imap/trunk/protocol-tester/src/main/java/org/apache/james/test/functional/HostSystem.java
    james/imap/trunk/seda/pom.xml
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/FrameworkForAuthenticatedState.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/FrameworkForNonAuthenticatedState.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/external/ExternalHostSystem.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/AuthenticatedState.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/ConcurrentSessions.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/Events.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/Expunge.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/Fetch.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/FetchBodySection.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/FetchBodyStructure.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/FetchHeaders.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/Listing.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/NonAuthenticatedState.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/PartialFetch.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/Rename.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/Search.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/Security.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/Select.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/SelectedInbox.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/SelectedState.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/functional/suite/UidSearch.java
    james/imap/trunk/seda/src/test/java/org/apache/james/imap/main/ImapRequestHandlerAdandonConnectionTest.java

Modified: james/imap/trunk/api/pom.xml
URL: http://svn.apache.org/viewvc/james/imap/trunk/api/pom.xml?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/api/pom.xml (original)
+++ james/imap/trunk/api/pom.xml Tue Mar 16 17:55:28 2010
@@ -50,7 +50,7 @@
     </dependency>
     <dependency>
       <groupId>org.jmock</groupId>
-      <artifactId>jmock-junit3</artifactId>
+      <artifactId>jmock-junit4</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: james/imap/trunk/api/src/test/java/org/apache/james/imap/api/message/response/AbstractTestForStatusResponseFactory.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/api/src/test/java/org/apache/james/imap/api/message/response/AbstractTestForStatusResponseFactory.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/api/src/test/java/org/apache/james/imap/api/message/response/AbstractTestForStatusResponseFactory.java (original)
+++ james/imap/trunk/api/src/test/java/org/apache/james/imap/api/message/response/AbstractTestForStatusResponseFactory.java Tue Mar 16 17:55:28 2010
@@ -19,14 +19,21 @@
 
 package org.apache.james.imap.api.message.response;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.response.StatusResponse;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.integration.junit4.JMock;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-abstract public class AbstractTestForStatusResponseFactory extends
-        MockObjectTestCase {
+@RunWith(JMock.class)
+abstract public class AbstractTestForStatusResponseFactory  {
 
     private static final String TAG = "ATAG";
 
@@ -42,16 +49,13 @@ abstract public class AbstractTestForSta
 
     abstract protected StatusResponseFactory createInstance();
 
+    @Before
     protected void setUp() throws Exception {
-        super.setUp();
         factory = createInstance();
         command = ImapCommand.anyStateCommand("Command");
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
+    @Test
     public void testTaggedOk() {
         StatusResponse response = factory.taggedOk(TAG, command, KEY);
         assertNotNull(response);
@@ -69,6 +73,7 @@ abstract public class AbstractTestForSta
         assertEquals(command, response.getCommand());
     }
 
+    @Test
     public void testTaggedNo() {
         StatusResponse response = factory.taggedNo(TAG, command, KEY);
         assertNotNull(response);
@@ -85,7 +90,8 @@ abstract public class AbstractTestForSta
         assertEquals(CODE, response.getResponseCode());
         assertEquals(command, response.getCommand());
     }
-
+    
+    @Test
     public void testTaggedBad() {
         StatusResponse response = factory.taggedBad(TAG, command, KEY);
         assertNotNull(response);
@@ -103,6 +109,7 @@ abstract public class AbstractTestForSta
         assertEquals(command, response.getCommand());
     }
 
+    @Test
     public void testUntaggedOk() {
         StatusResponse response = factory.untaggedOk(KEY);
         assertNotNull(response);
@@ -120,6 +127,8 @@ abstract public class AbstractTestForSta
         assertNull(response.getCommand());
     }
 
+
+    @Test
     public void testUntaggedNo() {
         StatusResponse response = factory.untaggedNo(KEY);
         assertNotNull(response);
@@ -137,6 +146,7 @@ abstract public class AbstractTestForSta
         assertNull(response.getCommand());
     }
 
+    @Test
     public void testUntaggedBad() {
         StatusResponse response = factory.untaggedBad(KEY);
         assertNotNull(response);
@@ -154,6 +164,7 @@ abstract public class AbstractTestForSta
         assertNull(response.getCommand());
     }
 
+    @Test
     public void testPreauth() {
         StatusResponse response = factory.preauth(KEY);
         assertNotNull(response);
@@ -173,6 +184,7 @@ abstract public class AbstractTestForSta
         assertNull(response.getCommand());
     }
 
+    @Test
     public void testBye() {
         StatusResponse response = factory.bye(KEY);
         assertNotNull(response);

Modified: james/imap/trunk/api/src/test/java/org/apache/james/imap/api/message/response/StatusResponseTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/api/src/test/java/org/apache/james/imap/api/message/response/StatusResponseTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/api/src/test/java/org/apache/james/imap/api/message/response/StatusResponseTest.java (original)
+++ james/imap/trunk/api/src/test/java/org/apache/james/imap/api/message/response/StatusResponseTest.java Tue Mar 16 17:55:28 2010
@@ -19,18 +19,15 @@
 
 package org.apache.james.imap.api.message.response;
 
-import org.apache.james.imap.api.message.response.StatusResponse;
+import static org.junit.Assert.*;
 
-import junit.framework.TestCase;
+import org.apache.james.imap.api.message.response.StatusResponse;
+import org.junit.Test;
 
-public class StatusResponseTest extends TestCase {
 
-    protected void setUp() throws Exception {
-    }
-
-    protected void tearDown() throws Exception {
-    }
+public class StatusResponseTest  {
 
+    @Test
     public void testResponseCodeExtension() throws Exception {
         assertEquals("Preserve names beginning with X", "XEXTENSION",
                 StatusResponse.ResponseCode.createExtension("XEXTENSION")

Modified: james/imap/trunk/decode/pom.xml
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/pom.xml?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/pom.xml (original)
+++ james/imap/trunk/decode/pom.xml Tue Mar 16 17:55:28 2010
@@ -78,7 +78,7 @@
     </dependency>
     <dependency>
       <groupId>org.jmock</groupId>
-      <artifactId>jmock-junit3</artifactId>
+      <artifactId>jmock-junit4</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/FetchCommandParserPartialFetchTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/FetchCommandParserPartialFetchTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/FetchCommandParserPartialFetchTest.java (original)
+++ james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/FetchCommandParserPartialFetchTest.java Tue Mar 16 17:55:28 2010
@@ -31,11 +31,19 @@ import org.apache.james.imap.api.message
 import org.apache.james.imap.decode.ImapRequestLineReader;
 import org.apache.james.imap.decode.DecodingException;
 import org.apache.james.imap.decode.parser.FetchCommandParser;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.jmock.Expectations;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
 
-public class FetchCommandParserPartialFetchTest extends MockObjectTestCase {
+@RunWith(JMock.class)
+public class FetchCommandParserPartialFetchTest  {
 
+    Mockery context = new JUnit4Mockery();
+    
     FetchCommandParser parser;
 
     ImapMessageFactory mockMessageFactory;
@@ -43,19 +51,17 @@ public class FetchCommandParserPartialFe
 
     ImapMessage message;
 
+    @Before
     protected void setUp() throws Exception {
-        super.setUp();
         parser = new FetchCommandParser();
-        mockMessageFactory = mock(ImapMessageFactory.class);
+        mockMessageFactory = context.mock(ImapMessageFactory.class);
         command = ImapCommand.anyStateCommand("Command");
-        message = mock(ImapMessage.class);
+        message = context.mock(ImapMessage.class);
         parser.setMessageFactory(mockMessageFactory);
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
 
+    @Test
     public void testShouldParseZeroAndLength() throws Exception {
         IdRange[] ranges = { new IdRange(1) };
         FetchData data = new FetchData();
@@ -64,6 +70,7 @@ public class FetchCommandParserPartialFe
         check("1 (BODY[]<0.100>)\r\n", ranges, false, data, "A01");
     }
 
+    @Test
     public void testShouldParseNonZeroAndLength() throws Exception {
         IdRange[] ranges = { new IdRange(1) };
         FetchData data = new FetchData();
@@ -72,13 +79,15 @@ public class FetchCommandParserPartialFe
         check("1 (BODY[]<20.12342348>)\r\n", ranges, false, data, "A01");
     }
 
+    @Test
     public void testShouldNotParseZeroLength() throws Exception {
         try {
             ImapRequestLineReader reader = new ImapRequestLineReader(
                     new ByteArrayInputStream("1 (BODY[]<20.0>)\r\n"
                             .getBytes("US-ASCII")), new ByteArrayOutputStream());
-            parser.decode(command, reader, "A01", false, new MockLogger());
-            fail("Number of octets must be non-zero");
+            parser.decode(command, reader, "A01", false, new MockLogger());                
+            throw new Exception("Number of octets must be non-zero");
+
         } catch (DecodingException e) {
             // expected
         }
@@ -89,7 +98,7 @@ public class FetchCommandParserPartialFe
         ImapRequestLineReader reader = new ImapRequestLineReader(
                 new ByteArrayInputStream(input.getBytes("US-ASCII")),
                 new ByteArrayOutputStream());
-        checking(new Expectations() {{
+        context.checking(new Expectations() {{
             oneOf (mockMessageFactory).createFetchMessage( with(equal(command)), with(equal(useUids)), 
                     with(equal(idSet)),with(equal(data)), with(same(tag)));will(returnValue(message));
         }});

Modified: james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserAndParenthesesTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserAndParenthesesTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserAndParenthesesTest.java (original)
+++ james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserAndParenthesesTest.java Tue Mar 16 17:55:28 2010
@@ -19,6 +19,8 @@
 
 package org.apache.james.imap.decode.parser;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.UnsupportedEncodingException;
@@ -33,10 +35,17 @@ import org.apache.james.imap.api.message
 import org.apache.james.imap.api.message.request.SearchKey;
 import org.apache.james.imap.decode.ImapRequestLineReader;
 import org.apache.james.imap.decode.DecodingException;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class SearchCommandParserAndParenthesesTest extends MockObjectTestCase {
+@RunWith(JMock.class)
+public class SearchCommandParserAndParenthesesTest {
 
+    private Mockery context = new JUnit4Mockery();
     Input[] variety = { sequence(), uid(), fromHeader(), since(),
             stringQuoted(), stringUnquoted(), draft(), mailingListHeader(),
             on(), unanswered() };
@@ -146,23 +155,21 @@ public class SearchCommandParserAndParen
 
     ImapMessage message;
 
+    @Before
     protected void setUp() throws Exception {
-        super.setUp();
         parser = new SearchCommandParser();
-        mockMessageFactory = mock(ImapMessageFactory.class);
+        mockMessageFactory = context.mock(ImapMessageFactory.class);
         command = ImapCommand.anyStateCommand("Command");
-        message = mock(ImapMessage.class);
+        message = context.mock(ImapMessage.class);
         parser.setMessageFactory(mockMessageFactory);
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
+    @Test
     public void testShouldParseTopLevelParentheses() throws Exception {
         check(and(variety, true));
     }
 
+    @Test
     public void testShouldParseDeepParentheses() throws Exception {
         Input[] deep = { and(variety, true), and(variety, true), sequence(),
                 and(variety, true), draft(), mailingListHeader() };
@@ -173,6 +180,7 @@ public class SearchCommandParserAndParen
         check(and(top, true));
     }
 
+    @Test
     public void testShouldParseParenthesesOnTopLevel() throws Exception {
         Input[] deep = { and(variety, true), and(variety, true), sequence(),
                 and(variety, true), draft(), mailingListHeader() };

Modified: james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserCharsetTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserCharsetTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserCharsetTest.java (original)
+++ james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserCharsetTest.java Tue Mar 16 17:55:28 2010
@@ -19,6 +19,8 @@
 
 package org.apache.james.imap.decode.parser;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.nio.charset.Charset;
@@ -36,9 +38,15 @@ import org.apache.james.imap.api.message
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.decode.ImapRequestLineReader;
 import org.jmock.Expectations;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class SearchCommandParserCharsetTest extends MockObjectTestCase {
+@RunWith(JMock.class)
+public class SearchCommandParserCharsetTest {
 
     private static final Charset UTF8 = Charset.forName("UTF-8");
 
@@ -64,6 +72,7 @@ public class SearchCommandParserCharsetT
 
     StatusResponseFactory mockStatusResponseFactory;
 
+    private Mockery context = new JUnit4Mockery();
 
     ImapMessageFactory mockMessageFactory;
     
@@ -71,21 +80,19 @@ public class SearchCommandParserCharsetT
 
     ImapMessage message;
 
+    @Before
     protected void setUp() throws Exception {
-        super.setUp();
         parser = new SearchCommandParser();
-        mockMessageFactory = mock(ImapMessageFactory.class);
+        mockMessageFactory = context.mock(ImapMessageFactory.class);
         command = ImapCommand.anyStateCommand("Command");
-        message = mock(ImapMessage.class);
-        mockStatusResponseFactory = mock(StatusResponseFactory.class);
+        message = context.mock(ImapMessage.class);
+        mockStatusResponseFactory = context.mock(StatusResponseFactory.class);
         parser.setMessageFactory(mockMessageFactory);
         parser.setStatusResponseFactory(mockStatusResponseFactory);
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
 
+    @Test
     public void testBadCharset() throws Exception {
         final Collection<String> charsetNames = new HashSet<String>();
         for (final Iterator<Charset> it = Charset.availableCharsets().values()
@@ -94,7 +101,7 @@ public class SearchCommandParserCharsetT
             final Set<String> aliases = charset.aliases();
             charsetNames.addAll(aliases);
         }
-        checking(new Expectations() {{
+        context.checking(new Expectations() {{
             oneOf (mockStatusResponseFactory).taggedNo(
                     with(equal(TAG)), 
                     with(same(command)), 
@@ -107,53 +114,63 @@ public class SearchCommandParserCharsetT
         parser.decode(command, reader, TAG, false, new MockLogger());
     }
 
+    @Test
     public void testBCCShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildBcc(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("BCC".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testBODYShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildBody(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("BODY".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testCCShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildCc(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("CC".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testFROMShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildFrom(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("FROM".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testHEADERShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey
                 .buildHeader("whatever", NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("HEADER whatever".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testSUBJECTShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildSubject(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("SUBJECT".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testTEXTShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildText(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("TEXT".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testTOShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildTo(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("TO".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testASCIICharset() throws Exception {
         SearchKey key = SearchKey.buildBcc(ASCII_SEARCH_TERM);
         checkValid("CHARSET US-ASCII BCC \"" + ASCII_SEARCH_TERM + "\"", key,
                 true, "US-ASCII");
     }
 
+    @Test
     public void testSimpleUTF8Charset() throws Exception {
         SearchKey key = SearchKey.buildBcc(ASCII_SEARCH_TERM);
         checkValid("CHARSET UTF-8 BCC \"" + ASCII_SEARCH_TERM + "\"", key,

Modified: james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserNotTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserNotTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserNotTest.java (original)
+++ james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserNotTest.java Tue Mar 16 17:55:28 2010
@@ -19,6 +19,8 @@
 
 package org.apache.james.imap.decode.parser;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
@@ -29,9 +31,15 @@ import org.apache.james.imap.api.message
 import org.apache.james.imap.api.message.request.DayMonthYear;
 import org.apache.james.imap.api.message.request.SearchKey;
 import org.apache.james.imap.decode.ImapRequestLineReader;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class SearchCommandParserNotTest extends MockObjectTestCase {
+@RunWith(JMock.class)
+public class SearchCommandParserNotTest {
 
     SearchCommandParser parser;
 
@@ -40,19 +48,18 @@ public class SearchCommandParserNotTest 
 
     ImapMessage message;
 
+    private Mockery context = new JUnit4Mockery();
+    
+    @Before
     protected void setUp() throws Exception {
-        super.setUp();
         parser = new SearchCommandParser();
-        mockMessageFactory = mock(ImapMessageFactory.class);
+        mockMessageFactory = context.mock(ImapMessageFactory.class);
         command = ImapCommand.anyStateCommand("Command");
-        message = mock(ImapMessage.class);
+        message = context.mock(ImapMessage.class);
         parser.setMessageFactory(mockMessageFactory);
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
+    @Test
     public void testShouldParseNotSequence() throws Exception {
         IdRange[] range = { new IdRange(Long.MAX_VALUE, 100), new IdRange(110),
                 new IdRange(200, 201), new IdRange(400, Long.MAX_VALUE) };
@@ -61,6 +68,7 @@ public class SearchCommandParserNotTest 
         checkValid("NOT *:100,110,200:201,400:*\r\n", key);
     }
 
+    @Test
     public void testShouldParseNotUid() throws Exception {
         IdRange[] range = { new IdRange(Long.MAX_VALUE, 100), new IdRange(110),
                 new IdRange(200, 201), new IdRange(400, Long.MAX_VALUE) };
@@ -69,6 +77,7 @@ public class SearchCommandParserNotTest 
         checkValid("NOT UID *:100,110,200:201,400:*\r\n", key);
     }
 
+    @Test
     public void testShouldParseNotHeaderKey() throws Exception {
         SearchKey notdKey = SearchKey.buildHeader("FROM", "Smith");
         SearchKey key = SearchKey.buildNot(notdKey);
@@ -76,6 +85,7 @@ public class SearchCommandParserNotTest 
         checkValid("NOT header FROM Smith\r\n", key);
     }
 
+    @Test
     public void testShouldParseNotDateParameterKey() throws Exception {
         SearchKey notdKey = SearchKey.buildSince(new DayMonthYear(11, 1, 2001));
         SearchKey key = SearchKey.buildNot(notdKey);
@@ -83,6 +93,7 @@ public class SearchCommandParserNotTest 
         checkValid("NOT SINCE 11-Jan-2001\r\n", key);
     }
 
+    @Test
     public void testShouldParseNotStringParameterKey() throws Exception {
         SearchKey notdKey = SearchKey.buildFrom("Smith");
         SearchKey key = SearchKey.buildNot(notdKey);
@@ -90,12 +101,14 @@ public class SearchCommandParserNotTest 
         checkValid("NOT FROM \"Smith\"\r\n", key);
     }
 
+    @Test
     public void testShouldParseNotStringQuotedParameterKey() throws Exception {
         SearchKey notdKey = SearchKey.buildFrom("Smith And Jones");
         SearchKey key = SearchKey.buildNot(notdKey);
         checkValid("NOT FROM \"Smith And Jones\"\r\n", key);
     }
 
+    @Test
     public void testShouldParseNotNoParameterKey() throws Exception {
         SearchKey notdKey = SearchKey.buildNew();
         SearchKey key = SearchKey.buildNot(notdKey);

Modified: james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserOrTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserOrTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserOrTest.java (original)
+++ james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserOrTest.java Tue Mar 16 17:55:28 2010
@@ -19,6 +19,8 @@
 
 package org.apache.james.imap.decode.parser;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
@@ -29,9 +31,15 @@ import org.apache.james.imap.api.message
 import org.apache.james.imap.api.message.request.DayMonthYear;
 import org.apache.james.imap.api.message.request.SearchKey;
 import org.apache.james.imap.decode.ImapRequestLineReader;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class SearchCommandParserOrTest extends MockObjectTestCase {
+@RunWith(JMock.class)
+public class SearchCommandParserOrTest {
     SearchCommandParser parser;
 
     ImapMessageFactory mockMessageFactory;
@@ -40,19 +48,17 @@ public class SearchCommandParserOrTest e
 
     ImapMessage message;
 
+    private Mockery context = new JUnit4Mockery();
+    
+    @Before
     protected void setUp() throws Exception {
-        super.setUp();
         parser = new SearchCommandParser();
-        mockMessageFactory = mock(ImapMessageFactory.class);
+        mockMessageFactory = context.mock(ImapMessageFactory.class);
         command = ImapCommand.anyStateCommand("Command");
-        message = mock(ImapMessage.class);
+        message = context.mock(ImapMessage.class);
         parser.setMessageFactory(mockMessageFactory);
     }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
+    
     public Input sequence() {
         IdRange[] range = { new IdRange(Long.MAX_VALUE, 100), new IdRange(110),
                 new IdRange(200, 201), new IdRange(400, Long.MAX_VALUE) };
@@ -92,6 +98,7 @@ public class SearchCommandParserOrTest e
         return new Input("DRAFT", key);
     }
 
+    @Test
     public void testDraftPermutations() throws Exception {
         checkValid(draft(), draft());
         checkValid(draft(), stringQuoted());
@@ -102,6 +109,7 @@ public class SearchCommandParserOrTest e
         checkValid(draft(), uid());
     }
 
+    @Test
     public void testDatePermutations() throws Exception {
         checkValid(date(), draft());
         checkValid(date(), stringQuoted());
@@ -112,6 +120,7 @@ public class SearchCommandParserOrTest e
         checkValid(date(), uid());
     }
 
+    @Test
     public void testHeaderPermutations() throws Exception {
         checkValid(header(), draft());
         checkValid(header(), stringQuoted());
@@ -122,6 +131,7 @@ public class SearchCommandParserOrTest e
         checkValid(header(), uid());
     }
 
+    @Test
     public void testSequencePermutations() throws Exception {
         checkValid(sequence(), draft());
         checkValid(sequence(), stringQuoted());
@@ -132,6 +142,7 @@ public class SearchCommandParserOrTest e
         checkValid(sequence(), uid());
     }
 
+    @Test
     public void testStringQuotedPermutations() throws Exception {
         checkValid(stringQuoted(), draft());
         checkValid(stringQuoted(), stringQuoted());
@@ -142,6 +153,7 @@ public class SearchCommandParserOrTest e
         checkValid(stringQuoted(), uid());
     }
 
+    @Test
     public void testStringUnquotedPermutations() throws Exception {
         checkValid(stringUnquoted(), draft());
         checkValid(stringUnquoted(), stringQuoted());
@@ -152,6 +164,7 @@ public class SearchCommandParserOrTest e
         checkValid(stringUnquoted(), uid());
     }
 
+    @Test
     public void testUidPermutations() throws Exception {
         checkValid(uid(), draft());
         checkValid(uid(), stringQuoted());
@@ -162,6 +175,7 @@ public class SearchCommandParserOrTest e
         checkValid(uid(), uid());
     }
 
+    
     private void checkValid(Input one, Input two) throws Exception {
         String input = "OR " + one.input + " " + two.input + "\r\n";
         SearchKey key = SearchKey.buildOr(one.key, two.key);

Modified: james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserQuotedCharsetTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserQuotedCharsetTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserQuotedCharsetTest.java (original)
+++ james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserQuotedCharsetTest.java Tue Mar 16 17:55:28 2010
@@ -19,6 +19,8 @@
 
 package org.apache.james.imap.decode.parser;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.nio.charset.Charset;
@@ -37,9 +39,15 @@ import org.apache.james.imap.api.message
 import org.apache.james.imap.decode.ImapRequestLineReader;
 import org.apache.james.imap.decode.DecodingException;
 import org.jmock.Expectations;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class SearchCommandParserQuotedCharsetTest extends MockObjectTestCase {
+@RunWith(JMock.class)
+public class SearchCommandParserQuotedCharsetTest {
 
     private static final Charset UTF8 = Charset.forName("UTF-8");
 
@@ -134,21 +142,20 @@ public class SearchCommandParserQuotedCh
 
     ImapMessage message;
 
+    private Mockery mockery = new JUnit4Mockery();
+    
+    @Before
     protected void setUp() throws Exception {
-        super.setUp();
         parser = new SearchCommandParser();
-        mockMessageFactory = mock(ImapMessageFactory.class);
+        mockMessageFactory = mockery.mock(ImapMessageFactory.class);
         command = ImapCommand.anyStateCommand("Command");
-        message = mock(ImapMessage.class);
-        mockStatusResponseFactory = mock(StatusResponseFactory.class);
+        message = mockery.mock(ImapMessage.class);
+        mockStatusResponseFactory = mockery.mock(StatusResponseFactory.class);
         parser.setMessageFactory(mockMessageFactory);
         parser.setStatusResponseFactory(mockStatusResponseFactory);
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
+    @Test
     public void testShouldDecoderLengthyQuotedCharset() throws Exception {
         SearchKey key = SearchKey.buildBcc(LENGTHY_NON_ASCII_SEARCH_TERM);
         ImapRequestLineReader reader = new ImapRequestLineReader(
@@ -160,6 +167,7 @@ public class SearchCommandParserQuotedCh
         assertEquals(key, searchKey);
     }
 
+    @Test
     public void testShouldDecoderQuotedCharset() throws Exception {
         SearchKey key = SearchKey.buildBcc(NON_ASCII_SEARCH_TERM);
         ImapRequestLineReader reader = new ImapRequestLineReader(
@@ -171,6 +179,7 @@ public class SearchCommandParserQuotedCh
         assertEquals(key, searchKey);
     }
 
+    @Test
     public void testBadCharset() throws Exception {
         final Collection<String> charsetNames = new HashSet<String>();
         for (final Iterator<Charset> it = Charset.availableCharsets().values()
@@ -179,7 +188,7 @@ public class SearchCommandParserQuotedCh
             final Set<String> aliases = charset.aliases();
             charsetNames.addAll(aliases);
         }
-        checking(new Expectations() {{
+        mockery.checking(new Expectations() {{
             oneOf (mockStatusResponseFactory).taggedNo(
                     with(equal(TAG)), 
                     with(same(command)), 
@@ -192,6 +201,7 @@ public class SearchCommandParserQuotedCh
         parser.decode(command, reader, TAG, false, new MockLogger());
     }
 
+    @Test
     public void testShouldThrowProtocolExceptionWhenBytesAreNotEncodedByCharset()
             throws Exception {
         try {
@@ -206,53 +216,63 @@ public class SearchCommandParserQuotedCh
         }
     }
 
+    @Test
     public void testBCCShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildBcc(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("BCC".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testBODYShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildBody(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("BODY".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testCCShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildCc(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("CC".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testFROMShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildFrom(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("FROM".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testHEADERShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey
                 .buildHeader("whatever", NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("HEADER whatever".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testSUBJECTShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildSubject(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("SUBJECT".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testTEXTShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildText(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("TEXT".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testTOShouldConvertCharset() throws Exception {
         SearchKey key = SearchKey.buildTo(NON_ASCII_SEARCH_TERM);
         checkUTF8Valid("TO".getBytes("US-ASCII"), key);
     }
 
+    @Test
     public void testASCIICharset() throws Exception {
         SearchKey key = SearchKey.buildBcc(ASCII_SEARCH_TERM);
         checkValid("CHARSET US-ASCII BCC \"" + ASCII_SEARCH_TERM + "\"", key,
                 true, "US-ASCII");
     }
 
+    @Test
     public void testSimpleUTF8Charset() throws Exception {
         SearchKey key = SearchKey.buildBcc(ASCII_SEARCH_TERM);
         checkValid("CHARSET UTF-8 BCC \"" + ASCII_SEARCH_TERM + "\"", key,

Modified: james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserSearchKeySequenceSetTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserSearchKeySequenceSetTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserSearchKeySequenceSetTest.java (original)
+++ james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserSearchKeySequenceSetTest.java Tue Mar 16 17:55:28 2010
@@ -19,6 +19,8 @@
 
 package org.apache.james.imap.decode.parser;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
@@ -28,9 +30,15 @@ import org.apache.james.imap.api.ImapMes
 import org.apache.james.imap.api.message.IdRange;
 import org.apache.james.imap.api.message.request.SearchKey;
 import org.apache.james.imap.decode.ImapRequestLineReader;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class SearchCommandParserSearchKeySequenceSetTest extends MockObjectTestCase {
+@RunWith(JMock.class)
+public class SearchCommandParserSearchKeySequenceSetTest {
 
     SearchCommandParser parser;
 
@@ -40,19 +48,18 @@ public class SearchCommandParserSearchKe
 
     ImapMessage message;
 
+    private Mockery mockery = new JUnit4Mockery();
+    
+    @Before
     protected void setUp() throws Exception {
-        super.setUp();
         parser = new SearchCommandParser();
-        mockMessageFactory = mock(ImapMessageFactory.class);
+        mockMessageFactory = mockery.mock(ImapMessageFactory.class);
         command = ImapCommand.anyStateCommand("Command");
-        message = mock(ImapMessage.class);
+        message = mockery.mock(ImapMessage.class);
         parser.setMessageFactory(mockMessageFactory);
     }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
+    
+    @Test
     public void testAllNumbers() throws Exception {
 
         IdRange[] range = { new IdRange(2), new IdRange(4), new IdRange(9),
@@ -62,12 +69,14 @@ public class SearchCommandParserSearchKe
         check("2,4,9,16,25,36,49,64,81,100", range);
     }
 
+    @Test
     public void testEndStar() throws Exception {
         IdRange[] range = { new IdRange(8), new IdRange(9, 10),
                 new IdRange(17), new IdRange(100, Long.MAX_VALUE) };
         check("8,9:10,17,100:*", range);
     }
 
+    @Test
     public void testStartStar() throws Exception {
         IdRange[] range = { new IdRange(Long.MAX_VALUE, 9), new IdRange(15),
                 new IdRange(799, 820) };

Modified: james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserSearchKeyTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserSearchKeyTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserSearchKeyTest.java (original)
+++ james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserSearchKeyTest.java Tue Mar 16 17:55:28 2010
@@ -19,6 +19,8 @@
 
 package org.apache.james.imap.decode.parser;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
@@ -30,9 +32,15 @@ import org.apache.james.imap.api.message
 import org.apache.james.imap.api.message.request.SearchKey;
 import org.apache.james.imap.decode.ImapRequestLineReader;
 import org.apache.james.imap.decode.DecodingException;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class SearchCommandParserSearchKeyTest extends MockObjectTestCase {
+@RunWith(JMock.class)
+public class SearchCommandParserSearchKeyTest {
 
     private static final DayMonthYear DATE = new DayMonthYear(1, 1, 2000);
 
@@ -44,19 +52,20 @@ public class SearchCommandParserSearchKe
 
     ImapMessage message;
 
+    private Mockery mockery = new JUnit4Mockery();
+
+    @Before
     protected void setUp() throws Exception {
-        super.setUp();
         parser = new SearchCommandParser();
-        mockMessageFactory = mock(ImapMessageFactory.class);
+        mockMessageFactory = mockery.mock(ImapMessageFactory.class);
         command = ImapCommand.anyStateCommand("Command");
-        message = mock(ImapMessage.class);
+        message = mockery.mock(ImapMessage.class);
         parser.setMessageFactory(mockMessageFactory);
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
+    
 
+    @Test
     public void testShouldParseAll() throws Exception {
         SearchKey key = SearchKey.buildAll();
         checkValid("ALL\r\n", key);
@@ -67,6 +76,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("alm\r\n", key);
     }
 
+    @Test
     public void testShouldParseAnswered() throws Exception {
         SearchKey key = SearchKey.buildAnswered();
         checkValid("ANSWERED\r\n", key);
@@ -81,6 +91,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("answere\r\n", key);
     }
 
+    @Test
     public void testShouldParseBcc() throws Exception {
         SearchKey key = SearchKey.buildBcc("Somebody");
         checkValid("BCC Somebody\r\n", key);
@@ -95,6 +106,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("bccc\r\n", key);
     }
 
+    @Test
     public void testShouldParseOn() throws Exception {
         SearchKey key = SearchKey.buildOn(DATE);
         checkValid("ON 1-Jan-2000\r\n", key);
@@ -112,6 +124,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("on 1-Jan-\r\n", key);
     }
 
+    @Test
     public void testShouldParseSentBefore() throws Exception {
         SearchKey key = SearchKey.buildSentBefore(DATE);
         checkValid("SENTBEFORE 1-Jan-2000\r\n", key);
@@ -134,6 +147,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("sentbefore 1-Jan-\r\n", key);
     }
 
+    @Test
     public void testShouldParseSentOn() throws Exception {
         SearchKey key = SearchKey.buildSentOn(DATE);
         checkValid("SENTON 1-Jan-2000\r\n", key);
@@ -152,6 +166,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("senton 1-Jan-\r\n", key);
     }
 
+    @Test
     public void testShouldParseSentSince() throws Exception {
         SearchKey key = SearchKey.buildSentSince(DATE);
         checkValid("SENTSINCE 1-Jan-2000\r\n", key);
@@ -173,6 +188,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("sentsince 1-Jan-\r\n", key);
     }
 
+    @Test
     public void testShouldParseSince() throws Exception {
         SearchKey key = SearchKey.buildSince(DATE);
         checkValid("SINCE 1-Jan-2000\r\n", key);
@@ -191,6 +207,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("since 1-Jan-\r\n", key);
     }
 
+    @Test
     public void testShouldParseBefore() throws Exception {
         SearchKey key = SearchKey.buildBefore(DATE);
         checkValid("BEFORE 1-Jan-2000\r\n", key);
@@ -213,6 +230,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("BEforE 1-Jan-\r\n", key);
     }
 
+    @Test
     public void testShouldParseBody() throws Exception {
         SearchKey key = SearchKey.buildBody("Text");
         checkValid("BODY Text\r\n", key);
@@ -228,6 +246,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("Bodym\r\n", key);
     }
 
+    @Test
     public void testShouldParseTo() throws Exception {
         SearchKey key = SearchKey.buildTo("AnAddress");
         checkValid("TO AnAddress\r\n", key);
@@ -242,6 +261,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("to \r\n", key);
     }
 
+    @Test
     public void testShouldParseText() throws Exception {
         SearchKey key = SearchKey.buildText("SomeText");
         checkValid("TEXT SomeText\r\n", key);
@@ -257,6 +277,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("text \r\n", key);
     }
 
+    @Test
     public void testShouldParseSubject() throws Exception {
         SearchKey key = SearchKey.buildSubject("ASubject");
         checkValid("SUBJECT ASubject\r\n", key);
@@ -275,6 +296,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("subject \r\n", key);
     }
 
+    @Test
     public void testShouldParseCc() throws Exception {
         SearchKey key = SearchKey.buildCc("SomeText");
         checkValid("CC SomeText\r\n", key);
@@ -288,6 +310,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("ccc\r\n", key);
     }
 
+    @Test
     public void testShouldParseFrom() throws Exception {
         SearchKey key = SearchKey.buildFrom("Someone");
         checkValid("FROM Someone\r\n", key);
@@ -302,6 +325,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("froml\r\n", key);
     }
 
+    @Test
     public void testShouldParseKeyword() throws Exception {
         SearchKey key = SearchKey.buildKeyword("AFlag");
         checkValid("KEYWORD AFlag\r\n", key);
@@ -320,6 +344,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("keyword \r\n", key);
     }
 
+    @Test
     public void testShouldParseUnKeyword() throws Exception {
         SearchKey key = SearchKey.buildUnkeyword("AFlag");
         checkValid("UNKEYWORD AFlag\r\n", key);
@@ -340,6 +365,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("unkeyword \r\n", key);
     }
 
+    @Test
     public void testShouldParseHeader() throws Exception {
         SearchKey key = SearchKey.buildHeader("Field", "Value");
         checkValid("HEADER Field Value\r\n", key);
@@ -358,6 +384,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("header field \r\n", key);
     }
 
+    @Test
     private void checkValid(String input, final SearchKey key) throws Exception {
         ImapRequestLineReader reader = new ImapRequestLineReader(
                 new ByteArrayInputStream(input.getBytes("US-ASCII")),
@@ -366,6 +393,7 @@ public class SearchCommandParserSearchKe
         assertEquals(key, parser.searchKey(reader, null, false));
     }
 
+    @Test
     public void testShouldParseDeleted() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkValid("DELETED\r\n", key);
@@ -379,78 +407,91 @@ public class SearchCommandParserSearchKe
         checkInvalid("delete\r\n", key);
     }
 
+    @Test
     public void testEShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("e\r\n", key);
         checkInvalid("ee\r\n", key);
     }
 
+    @Test
     public void testGShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("g\r\n", key);
         checkInvalid("G\r\n", key);
     }
 
+    @Test
     public void testIShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("i\r\n", key);
         checkInvalid("I\r\n", key);
     }
 
+    @Test
     public void testJShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("j\r\n", key);
         checkInvalid("J\r\n", key);
     }
 
+    @Test
     public void testMShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("m\r\n", key);
         checkInvalid("M\r\n", key);
     }
-
+    
+    @Test
     public void testPShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("p\r\n", key);
         checkInvalid("Pp\r\n", key);
     }
 
+    @Test
     public void testQShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("q\r\n", key);
         checkInvalid("Qq\r\n", key);
     }
 
+    @Test
     public void testWShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("w\r\n", key);
         checkInvalid("ww\r\n", key);
     }
 
+    @Test
     public void testVShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("v\r\n", key);
         checkInvalid("vv\r\n", key);
     }
 
+    @Test
     public void testXShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("x\r\n", key);
         checkInvalid("xx\r\n", key);
     }
 
+    @Test
     public void testYShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("y\r\n", key);
         checkInvalid("yy\r\n", key);
     }
 
+    @Test
     public void testZShouldBeInvalid() throws Exception {
         SearchKey key = SearchKey.buildDeleted();
         checkInvalid("z\r\n", key);
         checkInvalid("zz\r\n", key);
     }
 
+    @Test
     public void testShouldParseRecent() throws Exception {
         SearchKey key = SearchKey.buildRecent();
         checkValid("RECENT\r\n", key);
@@ -463,6 +504,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("recen\r\n", key);
     }
 
+    @Test
     public void testShouldParseDraft() throws Exception {
         SearchKey key = SearchKey.buildDraft();
         checkValid("DRAFT\r\n", key);
@@ -474,6 +516,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("DRAF\r\n", key);
     }
 
+    @Test
     public void testShouldParseUnanswered() throws Exception {
         SearchKey key = SearchKey.buildUnanswered();
         checkValid("UNANSWERED\r\n", key);
@@ -490,6 +533,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("unanswere\r\n", key);
     }
 
+    @Test
     public void testShouldParseUndeleted() throws Exception {
         SearchKey key = SearchKey.buildUndeleted();
         checkValid("UNDELETED\r\n", key);
@@ -505,6 +549,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("undelete\r\n", key);
     }
 
+    @Test
     public void testShouldParseUnseen() throws Exception {
         SearchKey key = SearchKey.buildUnseen();
         checkValid("UNSEEN\r\n", key);
@@ -517,6 +562,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("unsee\r\n", key);
     }
 
+    @Test
     public void testShouldParseUndraft() throws Exception {
         SearchKey key = SearchKey.buildUndraft();
         checkValid("UNDRAFT\r\n", key);
@@ -530,6 +576,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("undraf\r\n", key);
     }
 
+    @Test
     public void testShouldParseUnflagged() throws Exception {
         SearchKey key = SearchKey.buildUnflagged();
         checkValid("UNFLAGGED\r\n", key);
@@ -545,6 +592,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("unflagge\r\n", key);
     }
 
+    @Test
     public void testShouldParseSeen() throws Exception {
         SearchKey key = SearchKey.buildSeen();
         checkValid("SEEN\r\n", key);
@@ -555,6 +603,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("see\r\n", key);
     }
 
+    @Test
     public void testShouldParseNew() throws Exception {
         SearchKey key = SearchKey.buildNew();
         checkValid("NEW\r\n", key);
@@ -565,6 +614,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("nwe\r\n", key);
     }
 
+    @Test
     public void testShouldParseOld() throws Exception {
         SearchKey key = SearchKey.buildOld();
         checkValid("OLD\r\n", key);
@@ -575,6 +625,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("olr\r\n", key);
     }
 
+    @Test
     public void testShouldParseFlagged() throws Exception {
         SearchKey key = SearchKey.buildFlagged();
         checkValid("FLAGGED\r\n", key);
@@ -589,6 +640,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("FLoas\r\n", key);
     }
 
+    @Test
     public void testShouldParseSmaller() throws Exception {
         SearchKey key = SearchKey.buildSmaller(1729);
         checkValid("SMALLER 1729\r\n", key);
@@ -604,6 +656,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("smaller peach\r\n", key);
     }
 
+    @Test
     public void testShouldParseLarger() throws Exception {
         SearchKey key = SearchKey.buildLarger(1234);
         checkValid("LARGER 1234\r\n", key);
@@ -619,6 +672,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("larger peach\r\n", key);
     }
 
+    @Test
     public void testShouldParseUid() throws Exception {
         IdRange[] range = { new IdRange(1) };
         SearchKey key = SearchKey.buildUidSet(range);
@@ -631,6 +685,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("uid \r\n", key);
     }
 
+    @Test
     public void testShouldParseNot() throws Exception {
         SearchKey notdKey = SearchKey.buildSeen();
         SearchKey key = SearchKey.buildNot(notdKey);
@@ -643,6 +698,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("not \r\n", key);
     }
 
+    @Test
     public void testShouldParseOr() throws Exception {
         SearchKey oneKey = SearchKey.buildSeen();
         SearchKey twoKey = SearchKey.buildDraft();
@@ -657,6 +713,7 @@ public class SearchCommandParserSearchKe
         checkInvalid("or seen \r\n", key);
     }
 
+    @Test
     public void testShouldParseSequenceSet() throws Exception {
         checkSequenceSet(1);
         checkSequenceSet(2);

Modified: james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserTopLevelAndTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserTopLevelAndTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserTopLevelAndTest.java (original)
+++ james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserTopLevelAndTest.java Tue Mar 16 17:55:28 2010
@@ -19,6 +19,8 @@
 
 package org.apache.james.imap.decode.parser;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.UnsupportedEncodingException;
@@ -33,9 +35,14 @@ import org.apache.james.imap.api.message
 import org.apache.james.imap.api.message.request.SearchKey;
 import org.apache.james.imap.decode.ImapRequestLineReader;
 import org.apache.james.imap.decode.DecodingException;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class SearchCommandParserTopLevelAndTest extends MockObjectTestCase {
+@RunWith(JMock.class)
+public class SearchCommandParserTopLevelAndTest {
 
     Input[] one = { sequence() };
 
@@ -131,24 +138,23 @@ public class SearchCommandParserTopLevel
 
     ImapMessage message;
 
+    private Mockery mockery = new JUnit4Mockery();
+    
     protected void setUp() throws Exception {
-        super.setUp();
         parser = new SearchCommandParser();
-        mockMessageFactory = mock(ImapMessageFactory.class);
+        mockMessageFactory = mockery.mock(ImapMessageFactory.class);
         command = ImapCommand.anyStateCommand("Command");
-        message = mock(ImapMessage.class);
+        message = mockery.mock(ImapMessage.class);
         parser.setMessageFactory(mockMessageFactory);
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
+    @Test
     public void testLargePermutations() throws Exception {
         permute(16, one);
         permute(32, one);
     }
 
+    @Test
     public void testBasePermutations() throws Exception {
         permute(2, base);
         permute(3, base);
@@ -156,6 +162,7 @@ public class SearchCommandParserTopLevel
         permute(5, base);
     }
 
+    @Test
     public void testVarietyPermutations() throws Exception {
         permute(5, variety);
     }

Modified: james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/StoreCommandParserTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/StoreCommandParserTest.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/StoreCommandParserTest.java (original)
+++ james/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/StoreCommandParserTest.java Tue Mar 16 17:55:28 2010
@@ -30,9 +30,15 @@ import org.apache.james.imap.api.ImapMes
 import org.apache.james.imap.api.message.IdRange;
 import org.apache.james.imap.decode.ImapRequestLineReader;
 import org.jmock.Expectations;
-import org.jmock.integration.junit3.MockObjectTestCase;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class StoreCommandParserTest extends MockObjectTestCase {
+@RunWith(JMock.class)
+public class StoreCommandParserTest {
 
     StoreCommandParser parser;
 
@@ -43,19 +49,18 @@ public class StoreCommandParserTest exte
 
     ImapMessage message;
 
+    private Mockery mockery = new JUnit4Mockery();
+
+    @Before
     protected void setUp() throws Exception {
-        super.setUp();
         parser = new StoreCommandParser();
-        mockMessageFactory = mock(ImapMessageFactory.class);
+        mockMessageFactory = mockery.mock(ImapMessageFactory.class);
         command = ImapCommand.anyStateCommand("Command");
-        message = mock(ImapMessage.class);
+        message = mockery.mock(ImapMessage.class);
         parser.setMessageFactory(mockMessageFactory);
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
+    @Test
     public void testShouldParseSilentDraftFlagged() throws Exception {
         IdRange[] ranges = { new IdRange(1) };
         Flags flags = new Flags();
@@ -72,7 +77,7 @@ public class StoreCommandParserTest exte
                 new ByteArrayInputStream(input.getBytes("US-ASCII")),
                 new ByteArrayOutputStream());
 
-        checking(new Expectations() {{
+        mockery.checking(new Expectations() {{
             oneOf (mockMessageFactory).createStoreMessage(
                     with(equal(command)), 
                     with(equal(idSet)), 

Modified: james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/ImapHostSystem.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/ImapHostSystem.java?rev=923904&r1=923903&r2=923904&view=diff
==============================================================================
--- james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/ImapHostSystem.java (original)
+++ james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/ImapHostSystem.java Tue Mar 16 17:55:28 2010
@@ -134,7 +134,6 @@ public abstract class ImapHostSystem imp
         }
 
         public void stop() throws Exception {
-        	ImapHostSystem.this.stop();
         }
 
         public void writeLine(String line) throws Exception {
@@ -250,8 +249,13 @@ public abstract class ImapHostSystem imp
     }
 
     public abstract boolean addUser(String user, String password) throws Exception;
-    
-    protected void stop() throws Exception {
-    	
+
+    public void afterTests() throws Exception {
+        // default do nothing
     }
+
+    public void beforeTests() throws Exception {
+        // default do nothing
+    }
+    
 }

Added: james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/AuthenticatedStateTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/AuthenticatedStateTest.java?rev=923904&view=auto
==============================================================================
--- james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/AuthenticatedStateTest.java (added)
+++ james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/AuthenticatedStateTest.java Tue Mar 16 17:55:28 2010
@@ -0,0 +1,29 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.imap.functional.jcr;
+
+import org.apache.james.imap.functional.suite.AuthenticatedState;
+
+public class AuthenticatedStateTest extends
+        AuthenticatedState {
+    public AuthenticatedStateTest() throws Exception {
+        super(JCRHostSystem.build());
+    }
+}

Added: james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/ConcurrentSessionsTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/ConcurrentSessionsTest.java?rev=923904&view=auto
==============================================================================
--- james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/ConcurrentSessionsTest.java (added)
+++ james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/ConcurrentSessionsTest.java Tue Mar 16 17:55:28 2010
@@ -0,0 +1,31 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.imap.functional.jcr;
+
+import org.apache.james.imap.functional.suite.ConcurrentSessions;
+
+public class ConcurrentSessionsTest extends
+        ConcurrentSessions {
+
+    public ConcurrentSessionsTest() throws Exception {
+        super(JCRHostSystem.build());
+    }
+
+}

Added: james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/EventTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/EventTest.java?rev=923904&view=auto
==============================================================================
--- james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/EventTest.java (added)
+++ james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/EventTest.java Tue Mar 16 17:55:28 2010
@@ -0,0 +1,30 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.imap.functional.jcr;
+
+import org.apache.james.imap.functional.suite.Events;
+
+public class EventTest extends Events {
+
+    public EventTest() throws Exception {
+        super(JCRHostSystem.build());
+    }
+
+}

Added: james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/ExpungeTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/ExpungeTest.java?rev=923904&view=auto
==============================================================================
--- james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/ExpungeTest.java (added)
+++ james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/ExpungeTest.java Tue Mar 16 17:55:28 2010
@@ -0,0 +1,30 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.imap.functional.jcr;
+
+import org.apache.james.imap.functional.suite.Expunge;
+
+public class ExpungeTest extends Expunge {
+
+    public ExpungeTest() throws Exception {
+        super(JCRHostSystem.build());
+    }
+
+}

Added: james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchBodySectionTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchBodySectionTest.java?rev=923904&view=auto
==============================================================================
--- james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchBodySectionTest.java (added)
+++ james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchBodySectionTest.java Tue Mar 16 17:55:28 2010
@@ -0,0 +1,29 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+package org.apache.james.imap.functional.jcr;
+
+import org.apache.james.imap.functional.suite.FetchBodySection;
+
+public class FetchBodySectionTest extends FetchBodySection {
+
+    public FetchBodySectionTest() throws Exception {
+        super(JCRHostSystem.build());
+
+    }
+}

Added: james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchBodyStructureTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchBodyStructureTest.java?rev=923904&view=auto
==============================================================================
--- james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchBodyStructureTest.java (added)
+++ james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchBodyStructureTest.java Tue Mar 16 17:55:28 2010
@@ -0,0 +1,31 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.imap.functional.jcr;
+
+import org.apache.james.imap.functional.suite.FetchBodyStructure;
+
+public class FetchBodyStructureTest extends
+        FetchBodyStructure {
+
+    public FetchBodyStructureTest() throws Exception {
+        super(JCRHostSystem.build());
+    }
+
+}

Added: james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchHeadersTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchHeadersTest.java?rev=923904&view=auto
==============================================================================
--- james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchHeadersTest.java (added)
+++ james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchHeadersTest.java Tue Mar 16 17:55:28 2010
@@ -0,0 +1,30 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.imap.functional.jcr;
+
+import org.apache.james.imap.functional.suite.FetchHeaders;
+
+public class FetchHeadersTest extends FetchHeaders {
+
+    public FetchHeadersTest() throws Exception {
+        super(JCRHostSystem.build());
+    }
+
+}

Added: james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchTest.java?rev=923904&view=auto
==============================================================================
--- james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchTest.java (added)
+++ james/imap/trunk/deployment/src/test/java/org/apache/james/imap/functional/jcr/FetchTest.java Tue Mar 16 17:55:28 2010
@@ -0,0 +1,29 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.imap.functional.jcr;
+
+import org.apache.james.imap.functional.suite.Fetch;
+
+public class FetchTest extends Fetch {
+
+    public FetchTest() throws Exception {
+        super(JCRHostSystem.build());
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org