From df8d76b49e27faf17af6812ed41f9a56bc36b9f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Fri, 13 Apr 2018 15:00:05 +0200 Subject: [PATCH] #12 - provide basic test for generating ComponentModel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Pupier --- .../model/util/ModelHelperTest.java | 29 +++++++++++++++++++ .../model/util/StringUtilsTest.java | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/test/java/com/github/cameltooling/model/util/ModelHelperTest.java diff --git a/src/test/java/com/github/cameltooling/model/util/ModelHelperTest.java b/src/test/java/com/github/cameltooling/model/util/ModelHelperTest.java new file mode 100644 index 0000000..ad97dd4 --- /dev/null +++ b/src/test/java/com/github/cameltooling/model/util/ModelHelperTest.java @@ -0,0 +1,29 @@ +/** + * 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 com.github.cameltooling.model.util; + +import org.apache.camel.catalog.DefaultCamelCatalog; +import org.junit.Test; + +public class ModelHelperTest { + + @Test + public void testGenerateComponentModelForTimerWithoutError() throws Exception { + ModelHelper.generateComponentModel(new DefaultCamelCatalog().componentJSonSchema("timer"), true); + } + +} diff --git a/src/test/java/com/github/cameltooling/model/util/StringUtilsTest.java b/src/test/java/com/github/cameltooling/model/util/StringUtilsTest.java index 1d9c601..4b017d6 100644 --- a/src/test/java/com/github/cameltooling/model/util/StringUtilsTest.java +++ b/src/test/java/com/github/cameltooling/model/util/StringUtilsTest.java @@ -141,7 +141,7 @@ public void wrapLongWordsContainingSpaces() { } @Test - public void wrapNothin() { + public void wrapNothing() { assertNull(StringUtils.wrapWords(null, "\n", 80, true)); }