diff options
author | Jim Hahn <jrh3@att.com> | 2020-07-21 09:55:38 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-07-21 16:25:53 -0400 |
commit | 248a660d61fa03caa4710cf8cfe144eb245b807b (patch) | |
tree | 9f7c9aa7fda6d9ab9977bf2398a0136a787dc62a /models-interactions/model-simulators | |
parent | f203526d0f86d385976da394bd1f0f918e4445d9 (diff) |
Fix some sonars in policy-models
Fixed the following sonar issues in some of the project directories:
- use assertNull, assertEquals, etc.
- swap assertEquals arguments
- extract a constant
- don't invoke toString() in logger calls
- TODOs
- generic types
Issue-ID: POLICY-2714
Change-Id: Id8803f9bf617ea9fc173a67b8606600709b55bdc
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-simulators')
2 files changed, 5 insertions, 5 deletions
diff --git a/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java b/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java index 1d60af0e1..e8d2f7d32 100644 --- a/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java +++ b/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * simulators * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -58,6 +58,6 @@ public class AaiSimulatorTest { final AaiCqResponse response = new AaiManager(new RestManager()).getCustomQueryResponse("http://localhost:6666", "testUser", "testPass", UUID.randomUUID(), "f953c499-4b1e-426b-8c6d-e9e9f1fc730f"); assertNotNull(response); - assertEquals(response.getVserver().getVserverId(), "f953c499-4b1e-426b-8c6d-e9e9f1fc730f"); + assertEquals("f953c499-4b1e-426b-8c6d-e9e9f1fc730f", response.getVserver().getVserverId()); } } diff --git a/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/VfcSimulatorTest.java b/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/VfcSimulatorTest.java index d68e9dc5d..dc48e75a1 100644 --- a/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/VfcSimulatorTest.java +++ b/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/VfcSimulatorTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * simulators * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2019-2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,8 +21,8 @@ package org.onap.policy.simulators; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.HashMap; @@ -60,7 +60,7 @@ public class VfcSimulatorTest { new RestManager().post("http://localhost:6668/api/nslcm/v1/ns/1234567890/heal", "username", "password", new HashMap<String, String>(), "application/json", "Some Request Here"); assertNotNull(httpDetails); - assertTrue(httpDetails.getLeft() == 202); + assertEquals(202, httpDetails.getLeft().intValue()); final VfcResponse response = Serialization.gsonPretty.fromJson(httpDetails.getRight(), VfcResponse.class); assertNotNull(response); } |