From aac3c1d70c439910e25a2634f872f497486509ec Mon Sep 17 00:00:00 2001 From: waynedunican Date: Mon, 13 Jul 2020 11:13:53 +0100 Subject: Replace try/catch with assertj Replaced try/catch blocks with assertj assertions in apex-pdp. Last batch of changes Issue-ID: POLICY-2451 Change-Id: I39bd02fdbd8389818dcf1b786189c1e344ddcea5 Signed-off-by: waynedunican --- .../apex/tools/simple/wsclient/WsClientTest.java | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'tools/simple-wsclient/src') diff --git a/tools/simple-wsclient/src/test/java/org/onap/policy/apex/tools/simple/wsclient/WsClientTest.java b/tools/simple-wsclient/src/test/java/org/onap/policy/apex/tools/simple/wsclient/WsClientTest.java index 9ca7e9296..8ff185504 100644 --- a/tools/simple-wsclient/src/test/java/org/onap/policy/apex/tools/simple/wsclient/WsClientTest.java +++ b/tools/simple-wsclient/src/test/java/org/onap/policy/apex/tools/simple/wsclient/WsClientTest.java @@ -1,19 +1,20 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ @@ -21,7 +22,6 @@ package org.onap.policy.apex.tools.simple.wsclient; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -35,14 +35,10 @@ import org.junit.Test; public class WsClientTest { @Test public void testWsClient() { - try { - final String[] EventArgs = - { "-h" }; - - WsClientMain.main(EventArgs); - } catch (Exception exc) { - fail("test should not throw an exception"); - } + final String[] EventArgs = + { "-h" }; + + WsClientMain.main(EventArgs); } @Test -- cgit 1.2.3-korg