From b820313760640f104024b5c8b8b0e9fbf6bec77e Mon Sep 17 00:00:00 2001 From: mmichalek Date: Wed, 23 Nov 2016 08:23:19 -0500 Subject: [PATCH] 0002910: Node Communication Type FILE_EXTRACT is too long --- .../impl/NodeCommunicationServiceTest.java | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 symmetric-core/src/test/java/org/jumpmind/symmetric/service/impl/NodeCommunicationServiceTest.java diff --git a/symmetric-core/src/test/java/org/jumpmind/symmetric/service/impl/NodeCommunicationServiceTest.java b/symmetric-core/src/test/java/org/jumpmind/symmetric/service/impl/NodeCommunicationServiceTest.java new file mode 100644 index 0000000000..175e2f3fd2 --- /dev/null +++ b/symmetric-core/src/test/java/org/jumpmind/symmetric/service/impl/NodeCommunicationServiceTest.java @@ -0,0 +1,41 @@ +/** + * Licensed to JumpMind Inc under one or more contributor + * license agreements. See the NOTICE file distributed + * with this work for additional information regarding + * copyright ownership. JumpMind Inc licenses this file + * to you under the GNU General Public License, version 3.0 (GPLv3) + * (the "License"); you may not use this file except in compliance + * with the License. + * + * You should have received a copy of the GNU General Public License, + * version 3.0 (GPLv3) along with this library; if not, see + * . + * + * 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.jumpmind.symmetric.service.impl; + + +import static org.junit.Assert.assertTrue; + +import org.jumpmind.symmetric.model.NodeCommunication; +import org.jumpmind.symmetric.model.NodeCommunication.CommunicationType; +import org.junit.Test; + +public class NodeCommunicationServiceTest { + + @Test + public void testNodeCommunicationTypeLengths() { + final int MAX_LENGTH_IN_DB = 10; + + for (CommunicationType communicationType : NodeCommunication.CommunicationType.values()) { + String msg = communicationType.name() + " is too long for DB. " + communicationType.name().length() + " <= " + MAX_LENGTH_IN_DB; + assertTrue(msg, communicationType.name().length() <= MAX_LENGTH_IN_DB); + } + } +}