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 ba...@apache.org on 2006/10/10 10:35:02 UTC

svn commit: r454662 [15/15] - in /james/server/sandbox/imap-integration: ./ src/java/org/apache/james/imapserver/ src/java/org/apache/james/imapserver/commands/ src/java/org/apache/james/imapserver/debug/ src/java/org/apache/james/imapserver/store/ src...

Propchange: james/server/sandbox/imap-integration/src/test/org/apache/james/mailboxmanager/torque/om/MailboxRowPeerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: james/server/sandbox/imap-integration/src/test/org/apache/james/mailboxmanager/torque/om/MailboxRowTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: james/server/sandbox/imap-integration/src/test/org/apache/james/mailboxmanager/torque/repository/TorqueMailboxManagerMailRepositoryNativeTestCase.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/imap-integration/src/test/org/apache/james/mailboxmanager/torque/repository/TorqueMailboxManagerMailRepositoryNativeTestCase.java?view=diff&rev=454662&r1=454661&r2=454662
==============================================================================
--- james/server/sandbox/imap-integration/src/test/org/apache/james/mailboxmanager/torque/repository/TorqueMailboxManagerMailRepositoryNativeTestCase.java (original)
+++ james/server/sandbox/imap-integration/src/test/org/apache/james/mailboxmanager/torque/repository/TorqueMailboxManagerMailRepositoryNativeTestCase.java Tue Oct 10 01:34:56 2006
@@ -24,108 +24,108 @@
 import org.apache.james.mailboxmanager.repository.MailboxManagerMailRepository;
 
 public class TorqueMailboxManagerMailRepositoryNativeTestCase extends
-		AbstractMailRepositoryNativeTestCase {
+        AbstractMailRepositoryNativeTestCase {
 
-	GeneralMailboxSession shadowMailbox = null;
+    GeneralMailboxSession shadowMailbox = null;
 
-	protected void configureRepository() throws Exception {
-		TorqueMailboxManagerProviderSingleton
-				.getTorqueMailboxManagerProviderInstance().deleteEverything();
-		MailboxManagerMailRepository mailboxManagerMailRepository = new MailboxManagerMailRepository();
-
-		DefaultConfigurationBuilder db = new DefaultConfigurationBuilder();
-
-		Configuration conf = db
-				.build(
-						new ByteArrayInputStream(
-								("<repository destinationURL=\"mailboxmanager://users/tuser\" type=\"MAIL\"></repository>").getBytes()),
-						"repository");
-		mailboxManagerMailRepository.configure(conf);
-		mailboxManagerMailRepository.initialize();
-		mailboxManagerMailRepository.setMailboxManagerProvider(TorqueMailboxManagerProviderSingleton
-				.getTorqueMailboxManagerProviderInstance());
-		mailRepository = mailboxManagerMailRepository;
-
-	}
-
-	protected void destroyRepository() throws IOException, MessagingException {
-	}
-
-	protected void assertNativeMessageCountEquals(int count) {
-		assertEquals(count, getNativeMessageCount());
-	}
-
-	
-	protected void assertNativeMessagesEqual(Collection expectedMessages)
-			throws IOException, MessagingException {
-		Collection existing = getNativeMessages();
-		Set existingSet = new HashSet();
-		for (Iterator iter = existing.iterator(); iter.hasNext();) {
-			MimeMessage mm = (MimeMessage) iter.next();
-			existingSet.add(new Integer(messageHashSum(mm)));
-		}
-		Set expectedSet = new HashSet();
-		for (Iterator iter = expectedMessages.iterator(); iter.hasNext();) {
-			MimeMessage mm = (MimeMessage) iter.next();
-			expectedSet.add(new Integer(messageHashSum(mm)));
-		}
-		assertEquals(expectedSet.size(), existingSet.size());
-		assertTrue(expectedSet.equals(existingSet));
-
-	}
-
-	protected int getNativeMessageCount() {
-		try {
-			return getShadowMailbox().getMessageCount();
-		} catch (MailboxManagerException e) {
-			throw new RuntimeException(e);
-		}
-	}
-
-	public void testLock() throws MessagingException {
-		super.testLock();
-	}
-
-	
-	protected Collection getNativeMessages() {
-		final MessageResult[] mr;
-		try {
-			mr = getShadowMailbox().getMessages(GeneralMessageSetImpl.all(),
-					MessageResult.MIME_MESSAGE);
-
-		} catch (MailboxManagerException e) {
-			throw new RuntimeException(e);
-		}
-		Collection existing = new ArrayList();
-		for (int i = 0; i < mr.length; i++) {
-			existing.add(mr[i].getMimeMessage());
-		}
-		return existing;
-	}
-
-	protected void nativeStoreMessage(MimeMessage mm) {
-		try {
-			getShadowMailbox().appendMessage(mm, new Date(),
-					MessageResult.NOTHING);
-		} catch (MailboxManagerException e) {
-			throw new RuntimeException(e);
-		}
-
-	}
-
-	protected GeneralMailboxSession getShadowMailbox() {
-		if (shadowMailbox == null) {
-			try {
-				shadowMailbox = (GeneralMailboxSession) TorqueMailboxManagerProviderSingleton
-						.getTorqueMailboxManagerProviderInstance()
-						.getGeneralManagerInstance(new MockUser())
-						.getGenericGeneralMailboxSession("#mail.tuser.INBOX");
-			} catch (Exception e) {
-				throw new RuntimeException(e);
-			}
-		}
+    protected void configureRepository() throws Exception {
+        TorqueMailboxManagerProviderSingleton
+                .getTorqueMailboxManagerProviderInstance().deleteEverything();
+        MailboxManagerMailRepository mailboxManagerMailRepository = new MailboxManagerMailRepository();
+
+        DefaultConfigurationBuilder db = new DefaultConfigurationBuilder();
+
+        Configuration conf = db
+                .build(
+                        new ByteArrayInputStream(
+                                ("<repository destinationURL=\"mailboxmanager://users/tuser\" type=\"MAIL\"></repository>").getBytes()),
+                        "repository");
+        mailboxManagerMailRepository.configure(conf);
+        mailboxManagerMailRepository.initialize();
+        mailboxManagerMailRepository.setMailboxManagerProvider(TorqueMailboxManagerProviderSingleton
+                .getTorqueMailboxManagerProviderInstance());
+        mailRepository = mailboxManagerMailRepository;
+
+    }
+
+    protected void destroyRepository() throws IOException, MessagingException {
+    }
+
+    protected void assertNativeMessageCountEquals(int count) {
+        assertEquals(count, getNativeMessageCount());
+    }
+
+    
+    protected void assertNativeMessagesEqual(Collection expectedMessages)
+            throws IOException, MessagingException {
+        Collection existing = getNativeMessages();
+        Set existingSet = new HashSet();
+        for (Iterator iter = existing.iterator(); iter.hasNext();) {
+            MimeMessage mm = (MimeMessage) iter.next();
+            existingSet.add(new Integer(messageHashSum(mm)));
+        }
+        Set expectedSet = new HashSet();
+        for (Iterator iter = expectedMessages.iterator(); iter.hasNext();) {
+            MimeMessage mm = (MimeMessage) iter.next();
+            expectedSet.add(new Integer(messageHashSum(mm)));
+        }
+        assertEquals(expectedSet.size(), existingSet.size());
+        assertTrue(expectedSet.equals(existingSet));
+
+    }
+
+    protected int getNativeMessageCount() {
+        try {
+            return getShadowMailbox().getMessageCount();
+        } catch (MailboxManagerException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public void testLock() throws MessagingException {
+        super.testLock();
+    }
+
+    
+    protected Collection getNativeMessages() {
+        final MessageResult[] mr;
+        try {
+            mr = getShadowMailbox().getMessages(GeneralMessageSetImpl.all(),
+                    MessageResult.MIME_MESSAGE);
+
+        } catch (MailboxManagerException e) {
+            throw new RuntimeException(e);
+        }
+        Collection existing = new ArrayList();
+        for (int i = 0; i < mr.length; i++) {
+            existing.add(mr[i].getMimeMessage());
+        }
+        return existing;
+    }
+
+    protected void nativeStoreMessage(MimeMessage mm) {
+        try {
+            getShadowMailbox().appendMessage(mm, new Date(),
+                    MessageResult.NOTHING);
+        } catch (MailboxManagerException e) {
+            throw new RuntimeException(e);
+        }
+
+    }
+
+    protected GeneralMailboxSession getShadowMailbox() {
+        if (shadowMailbox == null) {
+            try {
+                shadowMailbox = (GeneralMailboxSession) TorqueMailboxManagerProviderSingleton
+                        .getTorqueMailboxManagerProviderInstance()
+                        .getGeneralManagerInstance(new MockUser())
+                        .getGenericGeneralMailboxSession("#mail.tuser.INBOX");
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
 
-		return shadowMailbox;
-	}
+        return shadowMailbox;
+    }
 
 }

Propchange: james/server/sandbox/imap-integration/src/test/org/apache/james/mailboxmanager/torque/repository/TorqueMailboxManagerMailRepositoryNativeTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native



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