MAILET-124 Remove useless old abstract class for testing composite mailets
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/3a5c2aff Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/3a5c2aff Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/3a5c2aff Branch: refs/heads/master Commit: 3a5c2aff7890d3ae47cb36194364f861c84ffce4 Parents: b626c0c Author: Benoit Tellier <btell...@linagora.com> Authored: Thu Sep 1 15:16:06 2016 +0700 Committer: Benoit Tellier <btell...@linagora.com> Committed: Thu Sep 15 12:05:20 2016 +0200 ---------------------------------------------------------------------- .../impl/matchers/BaseMatchersTest.java | 68 -------------------- 1 file changed, 68 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/3a5c2aff/server/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java b/server/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java deleted file mode 100644 index 1f99c58..0000000 --- a/server/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************** - * 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.mailetcontainer.impl.matchers; - -import java.util.Arrays; - -import javax.mail.MessagingException; - -import org.apache.james.transport.matchers.All; -import org.apache.james.transport.matchers.RecipientIs; -import org.apache.mailet.MailAddress; -import org.apache.mailet.Matcher; -import org.apache.mailet.base.test.FakeMail; -import org.apache.mailet.base.test.FakeMailContext; -import org.apache.mailet.base.test.FakeMatcherConfig; -import org.junit.Before; - -public class BaseMatchersTest { - - protected FakeMailContext context; - protected FakeMail mockedMail; - protected CompositeMatcher matcher; - - @Before - public void setUp() throws Exception { - mockedMail = new FakeMail(); - mockedMail.setRecipients(Arrays.asList(new MailAddress("t...@james.apache.org"), new MailAddress( - "te...@james.apache.org"))); - } - - void setupCompositeMatcher(String matcherName, Class<? extends GenericCompositeMatcher> matcherClass) - throws Exception { - context = FakeMailContext.defaultContext(); - matcher = matcherClass.newInstance(); - FakeMatcherConfig mci = new FakeMatcherConfig(matcherName, context); - matcher.init(mci); - } - - void setupChild(String matcherName) throws MessagingException { - Matcher child; - if (matcherName.equals("All")) { - child = new All(); - } - else { - child = new RecipientIs(); - } - FakeMatcherConfig sub = new FakeMatcherConfig(matcherName, context); - child.init(sub); - matcher.add(child); - } -} --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org