diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-24 17:13:24 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-24 17:37:17 -0400 |
commit | dff3e8bb4ed367c05fb0425f03386994ed27d10a (patch) | |
tree | eb4bf4cd8dfea8cd807ebf0d11ee01502e5b3805 /gson/src/test/java/org/onap/policy/common/gson/internal/MethodAdapterTest.java | |
parent | 5765debbba7d08c633870b55eb38127a2e07c5f9 (diff) |
Sonar and eclipse warnings common
Unused imports
Not enough arguments
Issue-ID: POLICY-2204
Change-Id: I6405cb697ea976096b1276e2291b1c73617d33b5
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'gson/src/test/java/org/onap/policy/common/gson/internal/MethodAdapterTest.java')
-rw-r--r-- | gson/src/test/java/org/onap/policy/common/gson/internal/MethodAdapterTest.java | 11 |
1 files changed, 5 insertions, 6 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() { |