[
https://issues.apache.org/jira/browse/JAMES-1670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15122202#comment-15122202
]
ASF GitHub Bot commented on JAMES-1670:
---------------------------------------
Github user mbaechler commented on a diff in the pull request:
https://github.com/apache/james-project/pull/34#discussion_r51177172
--- Diff:
server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/RecipientFolderTest.java
---
@@ -0,0 +1,197 @@
+/**
+ * **************************************************************
+ * 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.transport.mailets.delivery;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import com.google.common.collect.Lists;
+import org.apache.james.mailbox.MailboxManager;
+import org.apache.james.mailbox.MailboxSession;
+import org.apache.james.mailbox.MessageManager;
+import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.sieverepository.api.SieveRepository;
+import org.apache.james.user.api.UsersRepository;
+import org.apache.mailet.Mail;
+import org.apache.mailet.MailAddress;
+import org.apache.mailet.base.test.FakeMail;
+import org.apache.mailet.base.test.FakeMailetConfig;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+import org.slf4j.Logger;
+
+import javax.activation.DataHandler;
+import javax.mail.Flags;
+import javax.mail.MessagingException;
+import javax.mail.Session;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeBodyPart;
+import javax.mail.internet.MimeMessage;
+import javax.mail.internet.MimeMultipart;
+import javax.mail.util.ByteArrayDataSource;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Properties;
+import javax.mail.internet.ParseException;
+import org.apache.james.transport.mailets.ToProcessor;
+import org.apache.james.transport.mailets.ToRecipientFolder;
+import org.apache.mailet.Mailet;
+import org.apache.mailet.base.test.FakeMailContext;
+import org.junit.Assert;
+
+public class RecipientFolderTest {
+
+ private UsersRepository usersRepository;
+ private MailboxManager mailboxManager;
+ private SieveRepository sieveRepository;
+ private ToRecipientFolder recipientFolder;
+ private FakeMailetConfig mailetConfig;
+
+ private String folder = null;
+
+ private String consume = null;
+
+ private void setFolder(String folder) {
--- End diff --
why do you need this setter ?
> ToRecipientFolder mailet should use init parameters
> ---------------------------------------------------
>
> Key: JAMES-1670
> URL: https://issues.apache.org/jira/browse/JAMES-1670
> Project: James Server
> Issue Type: Bug
> Affects Versions: Trunk
> Reporter: Ahmet Kaplan
> Priority: Minor
>
> ToRecipientFolder mailet has two parameters: folder and consume.
> Previously these parameters processed correctly but while integrating
> sieverepository, the parameters are disappeared.
> I propose to use folder and consume parameters again.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]