diff options
Diffstat (limited to 'holmes-actions/src/test/java/org')
-rw-r--r-- | holmes-actions/src/test/java/org/onap/holmes/common/utils/JacksonUtilTest.java | 59 | ||||
-rw-r--r-- | holmes-actions/src/test/java/org/onap/holmes/common/utils/Md5UtilTest.java | 1 |
2 files changed, 0 insertions, 60 deletions
diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/utils/JacksonUtilTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/utils/JacksonUtilTest.java deleted file mode 100644 index 6fa9c11..0000000 --- a/holmes-actions/src/test/java/org/onap/holmes/common/utils/JacksonUtilTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/**
- * Copyright 2016 ZTE Corporation.
- *
- * Licensed 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.onap.holmes.common.utils;
-
-import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonDeserializationContext;
-import com.google.gson.JsonDeserializer;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonParseException;
-import com.google.gson.JsonSerializationContext;
-import com.google.gson.JsonSerializer;
-import java.lang.reflect.Type;
-import org.junit.Test;
-import org.onap.holmes.common.utils.bean.TestBean;
-
-public class JacksonUtilTest {
-
- @Test
- public void testBeanToJson() throws Exception {
- TestBean o = new TestBean();
- o.setId("id");
- String result = GsonUtil.beanToJson(o);
- assertThat("{\"id\":\"id\"}", equalTo(result));
- }
-
- @Test
- public void jsonToBean_json_null() throws Exception {
- String jsonNull = null;
- TestBean testBean = GsonUtil.jsonToBean(jsonNull, TestBean.class);
- assertThat(testBean, equalTo(null));
- }
-
- @Test
- public void jsonToBean_json_normal() throws Exception {
- String json = "{\"id\":\"id\"}";
- TestBean testBean = GsonUtil.jsonToBean(json, TestBean.class);
- assertThat(testBean.getId(), equalTo("id"));
- }
-
-}
\ No newline at end of file diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/utils/Md5UtilTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/utils/Md5UtilTest.java index af81a11..f6680a3 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/utils/Md5UtilTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/utils/Md5UtilTest.java @@ -20,7 +20,6 @@ import static org.hamcrest.core.IsEqual.equalTo; import static org.hamcrest.core.IsNot.not; import static org.junit.Assert.assertThat; -import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.Test; import org.onap.holmes.common.dcae.entity.DcaeConfigurations; import org.onap.holmes.common.dcae.entity.SecurityInfo; |