This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 33694f83f315ee00fd678e41701d4433b1d1ee88 Author: Benoit Tellier <[email protected]> AuthorDate: Fri Mar 15 11:44:00 2019 +0700 JAMES-2687 Inline MessageIdManagerTestSystemProvider --- .../inmemory/InMemoryCombinationManagerTest.java | 7 +++- .../InMemoryMessageIdManagerStorageTest.java | 5 ++- .../MessageIdManagerTestSystemProvider.java | 39 ---------------------- 3 files changed, 8 insertions(+), 43 deletions(-) diff --git a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryCombinationManagerTest.java b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryCombinationManagerTest.java index 7626b35..222aa82 100644 --- a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryCombinationManagerTest.java +++ b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryCombinationManagerTest.java @@ -18,6 +18,7 @@ ****************************************************************/ package org.apache.james.mailbox.inmemory; +import org.apache.james.mailbox.inmemory.manager.InMemoryIntegrationResources; import org.apache.james.mailbox.store.AbstractCombinationManagerTest; import org.apache.james.mailbox.store.CombinationManagerTestSystem; import org.junit.Before; @@ -32,6 +33,10 @@ public class InMemoryCombinationManagerTest extends AbstractCombinationManagerTe @Override public CombinationManagerTestSystem createTestingData() { - return MessageIdManagerTestSystemProvider.createManagersTestingData(); + InMemoryIntegrationResources resources = new InMemoryIntegrationResources.Factory().create(); + + return new InMemoryCombinationManagerTestSystem( + resources.getMailboxManager(), + resources.getMessageIdManager()); } } diff --git a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMessageIdManagerStorageTest.java b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMessageIdManagerStorageTest.java index 976d648..c5d4846 100644 --- a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMessageIdManagerStorageTest.java +++ b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMessageIdManagerStorageTest.java @@ -18,7 +18,6 @@ ****************************************************************/ package org.apache.james.mailbox.inmemory; -import org.apache.james.mailbox.exception.MailboxException; import org.apache.james.mailbox.store.AbstractMessageIdManagerStorageTest; import org.apache.james.mailbox.store.MessageIdManagerTestSystem; import org.junit.Before; @@ -32,8 +31,8 @@ public class InMemoryMessageIdManagerStorageTest extends AbstractMessageIdManage } @Override - protected MessageIdManagerTestSystem createTestingData() throws MailboxException { - return MessageIdManagerTestSystemProvider.createTestingData(); + protected MessageIdManagerTestSystem createTestingData() { + return InMemoryMessageIdManagerTestSystem.create(); } } diff --git a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/MessageIdManagerTestSystemProvider.java b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/MessageIdManagerTestSystemProvider.java deleted file mode 100644 index 6d6ab17..0000000 --- a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/MessageIdManagerTestSystemProvider.java +++ /dev/null @@ -1,39 +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.mailbox.inmemory; - -import org.apache.james.mailbox.inmemory.manager.InMemoryIntegrationResources; -import org.apache.james.mailbox.store.CombinationManagerTestSystem; -import org.apache.james.mailbox.store.MessageIdManagerTestSystem; - -public class MessageIdManagerTestSystemProvider { - - public static MessageIdManagerTestSystem createTestingData() { - return InMemoryMessageIdManagerTestSystem.create(); - } - - public static CombinationManagerTestSystem createManagersTestingData() { - InMemoryIntegrationResources resources = new InMemoryIntegrationResources.Factory().create(); - - return new InMemoryCombinationManagerTestSystem( - resources.getMailboxManager(), - resources.getMessageIdManager()); - } - -} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
