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 2019/05/16 08:48:35 UTC
[james-project] 20/23: JAMES-2719 Add bean contract for AliasName
and ElasticSearchConfiguration in ES backend module
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 00026aa8b605581fbba588852571364a7550ea27
Author: Rene Cordier <rc...@linagora.com>
AuthorDate: Thu May 16 10:59:29 2019 +0700
JAMES-2719 Add bean contract for AliasName and ElasticSearchConfiguration in ES backend module
---
backends-common/elasticsearch-v6/pom.xml | 5 ++++
.../apache/james/backends/es/v6/AliasNameTest.java | 32 ++++++++++++++++++++++
.../es/v6/ElasticSearchConfigurationTest.java | 8 ++++++
3 files changed, 45 insertions(+)
diff --git a/backends-common/elasticsearch-v6/pom.xml b/backends-common/elasticsearch-v6/pom.xml
index 2502b42..d062168 100644
--- a/backends-common/elasticsearch-v6/pom.xml
+++ b/backends-common/elasticsearch-v6/pom.xml
@@ -66,6 +66,11 @@
<artifactId>feign-slf4j</artifactId>
</dependency>
<dependency>
+ <groupId>nl.jqno.equalsverifier</groupId>
+ <artifactId>equalsverifier</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
diff --git a/backends-common/elasticsearch-v6/src/test/java/org/apache/james/backends/es/v6/AliasNameTest.java b/backends-common/elasticsearch-v6/src/test/java/org/apache/james/backends/es/v6/AliasNameTest.java
new file mode 100644
index 0000000..3dc2f0c
--- /dev/null
+++ b/backends-common/elasticsearch-v6/src/test/java/org/apache/james/backends/es/v6/AliasNameTest.java
@@ -0,0 +1,32 @@
+/****************************************************************
+ * 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.backends.es.v6;
+
+import org.junit.jupiter.api.Test;
+
+import nl.jqno.equalsverifier.EqualsVerifier;
+
+class AliasNameTest {
+ @Test
+ void aliasNameShouldRespectBeanContract() {
+ EqualsVerifier.forClass(AliasName.class)
+ .verify();
+ }
+}
diff --git a/backends-common/elasticsearch-v6/src/test/java/org/apache/james/backends/es/v6/ElasticSearchConfigurationTest.java b/backends-common/elasticsearch-v6/src/test/java/org/apache/james/backends/es/v6/ElasticSearchConfigurationTest.java
index 43d80ef..1ba2a1a 100644
--- a/backends-common/elasticsearch-v6/src/test/java/org/apache/james/backends/es/v6/ElasticSearchConfigurationTest.java
+++ b/backends-common/elasticsearch-v6/src/test/java/org/apache/james/backends/es/v6/ElasticSearchConfigurationTest.java
@@ -31,9 +31,17 @@ import org.junit.Test;
import com.google.common.collect.ImmutableList;
+import nl.jqno.equalsverifier.EqualsVerifier;
+
public class ElasticSearchConfigurationTest {
@Test
+ public void elasticSearchConfigurationShouldRespectBeanContract() {
+ EqualsVerifier.forClass(ElasticSearchConfiguration.class)
+ .verify();
+ }
+
+ @Test
public void getNbReplicaShouldReturnConfiguredValue() throws ConfigurationException {
PropertiesConfiguration configuration = new PropertiesConfiguration();
int value = 36;
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org