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 bt...@apache.org on 2018/07/25 10:08:17 UTC
[15/15] james-project git commit: MAILBOX-342 Create a
ManageSieveMPTContract
MAILBOX-342 Create a ManageSieveMPTContract
File implementation should also rely on this contract
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/0271026d
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/0271026d
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/0271026d
Branch: refs/heads/master
Commit: 0271026d693e7a1218e8f881f466ad8a8c0a4afc
Parents: 2862b0b
Author: benwa <bt...@linagora.com>
Authored: Wed Jul 25 10:19:30 2018 +0700
Committer: benwa <bt...@linagora.com>
Committed: Wed Jul 25 16:56:27 2018 +0700
----------------------------------------------------------------------
.../cassandra/CassandraManageSieveMPTTest.java | 21 +-------
.../james/mpt/ManageSieveMPTContract.java | 52 ++++++++++++++++++++
.../managesieve/file/FileAuthenticateTest.java | 49 ------------------
.../managesieve/file/FileCapabilityTest.java | 49 ------------------
.../managesieve/file/FileCheckScriptTest.java | 49 ------------------
.../managesieve/file/FileDeleteScriptTest.java | 49 ------------------
.../mpt/managesieve/file/FileGetScriptTest.java | 49 ------------------
.../mpt/managesieve/file/FileHaveSpaceTest.java | 49 ------------------
.../managesieve/file/FileListScriptsTest.java | 49 ------------------
.../mpt/managesieve/file/FileLogoutTest.java | 49 ------------------
.../file/FileManageSieveMPTTest.java | 46 +++++++++++++++++
.../mpt/managesieve/file/FileNoopTest.java | 49 ------------------
.../mpt/managesieve/file/FilePutScriptTest.java | 49 ------------------
.../managesieve/file/FileRenameScriptTest.java | 49 ------------------
.../mpt/managesieve/file/FileSetActiveTest.java | 49 ------------------
.../mpt/managesieve/file/FileStartTlsTest.java | 49 ------------------
.../file/FileUnauthenticatedTest.java | 49 ------------------
17 files changed, 100 insertions(+), 705 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraManageSieveMPTTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraManageSieveMPTTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraManageSieveMPTTest.java
index 110ea85..d31ffcf 100644
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraManageSieveMPTTest.java
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraManageSieveMPTTest.java
@@ -20,32 +20,15 @@
package org.apache.james.mpt.managesieve.cassandra;
import org.apache.james.backends.cassandra.DockerCassandraExtension;
+import org.apache.james.mpt.ManageSieveMPTContract;
import org.apache.james.mpt.host.ManageSieveHostSystem;
import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.AuthenticateContract;
-import org.apache.james.mpt.testsuite.CapabilityContract;
-import org.apache.james.mpt.testsuite.CheckScriptContract;
-import org.apache.james.mpt.testsuite.DeleteScriptContract;
-import org.apache.james.mpt.testsuite.GetScriptContract;
-import org.apache.james.mpt.testsuite.HaveSpaceContract;
-import org.apache.james.mpt.testsuite.ListScriptsContract;
-import org.apache.james.mpt.testsuite.LogoutContract;
-import org.apache.james.mpt.testsuite.NoopContract;
-import org.apache.james.mpt.testsuite.PutScriptContract;
-import org.apache.james.mpt.testsuite.RenameScriptContract;
-import org.apache.james.mpt.testsuite.SetActiveContract;
-import org.apache.james.mpt.testsuite.StartTlsContract;
-import org.apache.james.mpt.testsuite.UnauthenticatedContract;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.ExtendWith;
@ExtendWith(DockerCassandraExtension.class)
-class CassandraManageSieveMPTTest implements AuthenticateContract, CapabilityContract, CheckScriptContract,
- DeleteScriptContract, GetScriptContract, HaveSpaceContract,
- ListScriptsContract, LogoutContract, NoopContract, PutScriptContract,
- RenameScriptContract, SetActiveContract, StartTlsContract,
- UnauthenticatedContract {
+class CassandraManageSieveMPTTest implements ManageSieveMPTContract {
private ManageSieveHostSystem system;
@BeforeEach
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/ManageSieveMPTContract.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/ManageSieveMPTContract.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/ManageSieveMPTContract.java
new file mode 100644
index 0000000..8da488e
--- /dev/null
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/ManageSieveMPTContract.java
@@ -0,0 +1,52 @@
+/****************************************************************
+ * 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.mpt;
+
+import org.apache.james.mpt.testsuite.AuthenticateContract;
+import org.apache.james.mpt.testsuite.CapabilityContract;
+import org.apache.james.mpt.testsuite.CheckScriptContract;
+import org.apache.james.mpt.testsuite.DeleteScriptContract;
+import org.apache.james.mpt.testsuite.GetScriptContract;
+import org.apache.james.mpt.testsuite.HaveSpaceContract;
+import org.apache.james.mpt.testsuite.ListScriptsContract;
+import org.apache.james.mpt.testsuite.LogoutContract;
+import org.apache.james.mpt.testsuite.NoopContract;
+import org.apache.james.mpt.testsuite.PutScriptContract;
+import org.apache.james.mpt.testsuite.RenameScriptContract;
+import org.apache.james.mpt.testsuite.SetActiveContract;
+import org.apache.james.mpt.testsuite.StartTlsContract;
+import org.apache.james.mpt.testsuite.UnauthenticatedContract;
+
+public interface ManageSieveMPTContract extends AuthenticateContract,
+ CapabilityContract,
+ CheckScriptContract,
+ DeleteScriptContract,
+ GetScriptContract,
+ HaveSpaceContract,
+ ListScriptsContract,
+ LogoutContract,
+ NoopContract,
+ PutScriptContract,
+ RenameScriptContract,
+ SetActiveContract,
+ StartTlsContract,
+ UnauthenticatedContract {
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileAuthenticateTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileAuthenticateTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileAuthenticateTest.java
deleted file mode 100644
index 9b64e48..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileAuthenticateTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.AuthenticateContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileAuthenticateTest implements AuthenticateContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void createSystem() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCapabilityTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCapabilityTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCapabilityTest.java
deleted file mode 100644
index 44d7280..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCapabilityTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.CapabilityContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileCapabilityTest implements CapabilityContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCheckScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCheckScriptTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCheckScriptTest.java
deleted file mode 100644
index 759f9eb..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCheckScriptTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.CheckScriptContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileCheckScriptTest implements CheckScriptContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileDeleteScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileDeleteScriptTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileDeleteScriptTest.java
deleted file mode 100644
index eef900d..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileDeleteScriptTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.DeleteScriptContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileDeleteScriptTest implements DeleteScriptContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileGetScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileGetScriptTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileGetScriptTest.java
deleted file mode 100644
index a9c7b02..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileGetScriptTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.GetScriptContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileGetScriptTest implements GetScriptContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileHaveSpaceTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileHaveSpaceTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileHaveSpaceTest.java
deleted file mode 100644
index 2563215..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileHaveSpaceTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.HaveSpaceContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileHaveSpaceTest implements HaveSpaceContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileListScriptsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileListScriptsTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileListScriptsTest.java
deleted file mode 100644
index ec59d66..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileListScriptsTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.ListScriptsContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileListScriptsTest implements ListScriptsContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileLogoutTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileLogoutTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileLogoutTest.java
deleted file mode 100644
index 15838ea..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileLogoutTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.LogoutContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileLogoutTest implements LogoutContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileManageSieveMPTTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileManageSieveMPTTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileManageSieveMPTTest.java
new file mode 100644
index 0000000..f8d3ebf
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileManageSieveMPTTest.java
@@ -0,0 +1,46 @@
+/****************************************************************
+ * 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.mpt.managesieve.file;
+
+import org.apache.james.mpt.ManageSieveMPTContract;
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.managesieve.file.host.FileHostSystem;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+
+public class FileManageSieveMPTTest implements ManageSieveMPTContract {
+ private ManageSieveHostSystem system;
+
+ @BeforeEach
+ void createSystem() throws Exception {
+ system = new FileHostSystem();
+ system.beforeTest();
+ }
+
+ @Override
+ public ManageSieveHostSystem hostSystem() {
+ return system;
+ }
+
+ @AfterEach
+ void tearDown() throws Exception {
+ hostSystem().afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java
deleted file mode 100644
index 95e3269..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.NoopContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileNoopTest implements NoopContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java
deleted file mode 100644
index 11fd414..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.PutScriptContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FilePutScriptTest implements PutScriptContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileRenameScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileRenameScriptTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileRenameScriptTest.java
deleted file mode 100644
index f6ffbf4..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileRenameScriptTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.RenameScriptContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileRenameScriptTest implements RenameScriptContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileSetActiveTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileSetActiveTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileSetActiveTest.java
deleted file mode 100644
index 36ae166..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileSetActiveTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.SetActiveContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileSetActiveTest implements SetActiveContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileStartTlsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileStartTlsTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileStartTlsTest.java
deleted file mode 100644
index f596b42..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileStartTlsTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.StartTlsContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileStartTlsTest implements StartTlsContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/0271026d/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileUnauthenticatedTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileUnauthenticatedTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileUnauthenticatedTest.java
deleted file mode 100644
index cc5d22f..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileUnauthenticatedTest.java
+++ /dev/null
@@ -1,49 +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.mpt.managesieve.file;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.testsuite.UnauthenticatedContract;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-public class FileUnauthenticatedTest implements UnauthenticatedContract {
- private ManageSieveHostSystem system;
-
- @BeforeEach
- void setUp() throws Exception {
- Injector injector = Guice.createInjector(new FileModule());
- system = injector.getInstance(ManageSieveHostSystem.class);
- system.beforeTest();
- }
-
- @Override
- public ManageSieveHostSystem hostSystem() {
- return system;
- }
-
- @AfterEach
- void tearDown() throws Exception {
- hostSystem().afterTest();
- }
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org