diff options
author | Jim Hahn <jrh3@att.com> | 2018-02-05 12:05:26 -0500 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2018-02-05 13:21:06 -0500 |
commit | 82bc8f543e578f32201d07a23b42d8539b89a4f1 (patch) | |
tree | e96a904c5a181faac3c16a1587fbe60fe9393fcb /integrity-audit/src/test/java/org/onap/policy/common/ia/test/ExceptionsTest.java | |
parent | 4aadab035016ebc675698961f410583eee86ebc7 (diff) |
Add utils-test project
Added utils-test project to policy/common.
Modified integrity-audit and integrity-monitor to use the new
utils-test project to test the Exception subclasses.
Change-Id: If4a27cdb2351b7c49b084dbf287950172fa059cf
Issue-ID: POLICY-582
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'integrity-audit/src/test/java/org/onap/policy/common/ia/test/ExceptionsTest.java')
-rw-r--r-- | integrity-audit/src/test/java/org/onap/policy/common/ia/test/ExceptionsTest.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/integrity-audit/src/test/java/org/onap/policy/common/ia/test/ExceptionsTest.java b/integrity-audit/src/test/java/org/onap/policy/common/ia/test/ExceptionsTest.java new file mode 100644 index 00000000..af4a8ceb --- /dev/null +++ b/integrity-audit/src/test/java/org/onap/policy/common/ia/test/ExceptionsTest.java @@ -0,0 +1,56 @@ +/* + * ============LICENSE_START======================================================= + * Integrity Monitor + * ================================================================================ + * Copyright (C) 2018 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. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.common.ia.test; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.onap.policy.common.ia.DbAuditException; +import org.onap.policy.common.ia.DbDaoTransactionException; +import org.onap.policy.common.ia.IntegrityAuditException; +import org.onap.policy.common.ia.IntegrityAuditPropertiesException; +import org.onap.policy.common.utils.test.ExceptionsTester; + +/** + * Tests various Exception subclasses. + */ +public class ExceptionsTest extends ExceptionsTester { + + @Test + public void testDbAuditException() throws Exception { + assertEquals(4, test(DbAuditException.class)); + } + + @Test + public void testDbDaoTransactionException() throws Exception { + assertEquals(4, test(DbDaoTransactionException.class)); + } + + @Test + public void testIntegrityAuditException() throws Exception { + assertEquals(4, test(IntegrityAuditException.class)); + } + + @Test + public void testIntegrityAuditPropertiesException() throws Exception { + assertEquals(4, test(IntegrityAuditPropertiesException.class)); + } +} |