From e87a189e91adfa04482363a9057c4a24fe1b03bd Mon Sep 17 00:00:00 2001 From: Joss Armstrong Date: Tue, 26 Feb 2019 11:50:20 +0000 Subject: Test coverage for Parameters Increased coverage to 100% Issue-ID: APPC-1499 Change-Id: I982023d9f818320f709da552d668b68e5ce0f7b3 Signed-off-by: Joss Armstrong --- .../onap/appc/flow/controller/data/ParametersTest.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'appc-config') diff --git a/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/ParametersTest.java b/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/ParametersTest.java index 729efd8d3..c17b642e9 100644 --- a/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/ParametersTest.java +++ b/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/ParametersTest.java @@ -3,6 +3,8 @@ * ONAP : APPC * ================================================================================ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Modifications Copyright (C) 2019 Ericsson * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,7 +75,18 @@ public class ParametersTest { @Test public void testEqualsObject() { assertTrue(param1.equals(param2) && param2.equals(param1)); - assertTrue(param1.equals(param1)); assertFalse(param1.equals(null)); + assertFalse(param1.equals("")); + param2.setParamName("other_param_name"); + assertFalse(param1.equals(param2)); + param1.setParamName("param_name"); + assertFalse(param1.equals(param2)); + param2.setParamName("param_name"); + param2.setParamValue("other_param_value"); + assertFalse(param1.equals(param2)); + param1.setParamValue("param_value"); + assertFalse(param1.equals(param2)); + param2.setParamValue("param_value"); + assertTrue(param1.equals(param1)); } } -- cgit 1.2.3-korg