diff options
author | Jim Hahn <jrh3@att.com> | 2019-06-19 17:31:24 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-06-21 11:36:18 -0400 |
commit | c9392e1a126de54ae8a0e1f3316729e878115300 (patch) | |
tree | 5a371d53f5e6cf8bedbb4daf94f558844037fd7d /integrity-audit/src/test/java/org/onap/policy/common/ia/ExceptionsTest.java | |
parent | 62463da9961f7e524559b34766baf2dd469fa910 (diff) |
Fix sonar issues in integrity audit
Mostly used Eclipse Refactor->Extract Method to reduce cyclomatic
complexity. Also combined a few "if" statements to reduce nesting
levels.
Also addressed some sonar issues in the tests (e.g., use "<>" where
appropriate).
Did not attempt to increase junit coverage.
Change-Id: I9d6c1305ce455f0d64249b548d123bb9bf37292a
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'integrity-audit/src/test/java/org/onap/policy/common/ia/ExceptionsTest.java')
-rw-r--r-- | integrity-audit/src/test/java/org/onap/policy/common/ia/ExceptionsTest.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/integrity-audit/src/test/java/org/onap/policy/common/ia/ExceptionsTest.java b/integrity-audit/src/test/java/org/onap/policy/common/ia/ExceptionsTest.java index 3c8ce528..40f7a738 100644 --- a/integrity-audit/src/test/java/org/onap/policy/common/ia/ExceptionsTest.java +++ b/integrity-audit/src/test/java/org/onap/policy/common/ia/ExceptionsTest.java @@ -2,14 +2,14 @@ * ============LICENSE_START======================================================= * Integrity Monitor * ================================================================================ - * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019 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. * 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. @@ -31,22 +31,22 @@ import org.onap.policy.common.utils.test.ExceptionsTester; public class ExceptionsTest extends ExceptionsTester { @Test - public void testDbAuditException() throws Exception { + public void testDbAuditException() { assertEquals(4, test(DbAuditException.class)); } @Test - public void testDbDaoTransactionException() throws Exception { + public void testDbDaoTransactionException() { assertEquals(4, test(DbDaoTransactionException.class)); } @Test - public void testIntegrityAuditException() throws Exception { + public void testIntegrityAuditException() { assertEquals(4, test(IntegrityAuditException.class)); } @Test - public void testIntegrityAuditPropertiesException() throws Exception { + public void testIntegrityAuditPropertiesException() { assertEquals(4, test(IntegrityAuditPropertiesException.class)); } } |