diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-27 08:03:24 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-27 10:56:46 -0400 |
commit | 7da3ddfa40de2f683a2d423d62b78a8d001108eb (patch) | |
tree | 260fa9e903a3a6f2a60467bbeac500ad62d0e916 /gson/src/test | |
parent | dff3e8bb4ed367c05fb0425f03386994ed27d10a (diff) |
More sonar issues cleanup
Either log or rethrow
Use boolean expression
Add at least one test
Remove commented out code
Issue-ID: POLICY-2204
Change-Id: I4fdf31aea75303e4f49d25198eb3b12341995bfe
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'gson/src/test')
-rw-r--r-- | gson/src/test/java/org/onap/policy/common/gson/internal/FieldDeserializerTest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gson/src/test/java/org/onap/policy/common/gson/internal/FieldDeserializerTest.java b/gson/src/test/java/org/onap/policy/common/gson/internal/FieldDeserializerTest.java index 509ddb79..acb241e6 100644 --- a/gson/src/test/java/org/onap/policy/common/gson/internal/FieldDeserializerTest.java +++ b/gson/src/test/java/org/onap/policy/common/gson/internal/FieldDeserializerTest.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. @@ -61,18 +61,18 @@ public class FieldDeserializerTest { // no value in tree - text remains unchanged text = INITIAL_VALUE; deser.getFromTree(json, this); - assertEquals(text, INITIAL_VALUE); + assertEquals(INITIAL_VALUE, text); // null value in tree - text remains unchanged json.add(TEXT_FIELD_NAME, JsonNull.INSTANCE); deser.getFromTree(json, this); - assertEquals(text, INITIAL_VALUE); + assertEquals(INITIAL_VALUE, text); // now assign a value - text should be changed now json.addProperty(TEXT_FIELD_NAME, NEW_VALUE); deser.getFromTree(json, this); - assertEquals(text, NEW_VALUE); + assertEquals(NEW_VALUE, text); /* * check list field |