aboutsummaryrefslogtreecommitdiffstats
path: root/gson
diff options
context:
space:
mode:
Diffstat (limited to 'gson')
-rw-r--r--gson/src/test/java/org/onap/policy/common/gson/internal/MethodAdapterTest.java11
-rw-r--r--gson/src/test/java/org/onap/policy/common/gson/internal/MethodDeserializerTest.java7
-rw-r--r--gson/src/test/java/org/onap/policy/common/gson/internal/MethodSerializerTest.java7
3 files changed, 11 insertions, 14 deletions
diff --git a/gson/src/test/java/org/onap/policy/common/gson/internal/MethodAdapterTest.java b/gson/src/test/java/org/onap/policy/common/gson/internal/MethodAdapterTest.java
index 9f39e3ce..6c13865d 100644
--- a/gson/src/test/java/org/onap/policy/common/gson/internal/MethodAdapterTest.java
+++ b/gson/src/test/java/org/onap/policy/common/gson/internal/MethodAdapterTest.java
@@ -1,8 +1,8 @@
-/*
+/*--
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@ import static org.junit.Assert.assertEquals;
import com.google.gson.Gson;
import com.google.gson.JsonParseException;
import org.junit.Test;
-import org.onap.policy.common.gson.internal.MethodAdapter;
public class MethodAdapterTest {
private static final Gson gson = new Gson();
@@ -36,16 +35,16 @@ public class MethodAdapterTest {
@Test
public void testMethodAdapter_testInvoke() throws Exception {
MethodAdapter adapter =
- new MethodAdapter(gson, MethodAdapterTest.class.getDeclaredMethod("getValue"), String.class);
+ new MethodAdapter(gson, MethodAdapterTest.class.getDeclaredMethod("getValue"), String.class);
assertEquals("hello", adapter.invoke(this));
MethodAdapter adapter2 = new MethodAdapter(gson,
- MethodAdapterTest.class.getDeclaredMethod("setValue", String.class), String.class);
+ MethodAdapterTest.class.getDeclaredMethod("setValue", String.class), String.class);
adapter2.invoke(this, "world");
assertEquals("world", saved);
assertThatThrownBy(() -> adapter2.invoke(this, 100)).isInstanceOf(JsonParseException.class)
- .hasMessage(MethodAdapter.INVOKE_ERR + MethodAdapterTest.class.getName() + ".setValue");
+ .hasMessage(MethodAdapter.INVOKE_ERR + MethodAdapterTest.class.getName() + ".setValue");
}
public String getValue() {
diff --git a/gson/src/test/java/org/onap/policy/common/gson/internal/MethodDeserializerTest.java b/gson/src/test/java/org/onap/policy/common/gson/internal/MethodDeserializerTest.java
index 338644ae..7fcfca18 100644
--- a/gson/src/test/java/org/onap/policy/common/gson/internal/MethodDeserializerTest.java
+++ b/gson/src/test/java/org/onap/policy/common/gson/internal/MethodDeserializerTest.java
@@ -1,8 +1,8 @@
-/*
+/*--
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,6 @@ import java.util.List;
import org.junit.Test;
import org.onap.policy.common.gson.JacksonExclusionStrategy;
import org.onap.policy.common.gson.internal.DataAdapterFactory.Data;
-import org.onap.policy.common.gson.internal.MethodDeserializer;
public class MethodDeserializerTest {
private static final String PROP_NAME = "text";
@@ -43,7 +42,7 @@ public class MethodDeserializerTest {
private static DataAdapterFactory dataAdapter = new DataAdapterFactory();
private static Gson gson = new GsonBuilder().registerTypeAdapterFactory(dataAdapter)
- .setExclusionStrategies(new JacksonExclusionStrategy()).create();
+ .setExclusionStrategies(new JacksonExclusionStrategy()).create();
private MethodDeserializer deser;
diff --git a/gson/src/test/java/org/onap/policy/common/gson/internal/MethodSerializerTest.java b/gson/src/test/java/org/onap/policy/common/gson/internal/MethodSerializerTest.java
index 586bf54d..ed240513 100644
--- a/gson/src/test/java/org/onap/policy/common/gson/internal/MethodSerializerTest.java
+++ b/gson/src/test/java/org/onap/policy/common/gson/internal/MethodSerializerTest.java
@@ -1,8 +1,8 @@
-/*
+/*--
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +31,6 @@ import java.util.List;
import org.junit.Test;
import org.onap.policy.common.gson.JacksonExclusionStrategy;
import org.onap.policy.common.gson.internal.DataAdapterFactory.Data;
-import org.onap.policy.common.gson.internal.MethodSerializer;
public class MethodSerializerTest {
private static final String PROP_NAME = "text";
@@ -40,7 +39,7 @@ public class MethodSerializerTest {
private static DataAdapterFactory dataAdapter = new DataAdapterFactory();
private static Gson gson = new GsonBuilder().registerTypeAdapterFactory(dataAdapter)
- .setExclusionStrategies(new JacksonExclusionStrategy()).create();
+ .setExclusionStrategies(new JacksonExclusionStrategy()).create();
private MethodSerializer ser;