diff options
author | Jim Hahn <jrh3@att.com> | 2020-07-28 17:58:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-07-28 17:58:22 +0000 |
commit | 32eae2731c8ac4e7b7787ca620cf19f2b7e5ddd6 (patch) | |
tree | bebf9f80cb26bacd24eda18dfdd21d7c429bf644 /services | |
parent | 2169b3fbf66153ea7e066ba0057585822208d6f4 (diff) | |
parent | b2e2d5f8daeefb08873d11de44cb4cfe7cfab03a (diff) |
Merge "SONAR assertions apex-pdp"
Diffstat (limited to 'services')
2 files changed, 7 insertions, 2 deletions
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java index 520c95650..ab20f4b0c 100644 --- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java +++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * 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. @@ -20,6 +21,8 @@ package org.onap.policy.apex.services.onappf; +import static org.assertj.core.api.Assertions.assertThatCode; + import org.junit.Test; import org.powermock.reflect.Whitebox; @@ -32,6 +35,6 @@ public class TestApexStarterConstants { @Test public void test() throws Exception { // verify that constructor does not throw an exception - Whitebox.invokeConstructor(ApexStarterConstants.class); + assertThatCode(() -> Whitebox.invokeConstructor(ApexStarterConstants.class)).doesNotThrowAnyException(); } } diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java index 927c1c3f3..adcec020b 100644 --- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java +++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019-2020 Nordix Foundation. + * 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. @@ -20,6 +21,7 @@ package org.onap.policy.apex.services.onappf; +import static org.assertj.core.api.Assertions.assertThatCode; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; @@ -95,7 +97,7 @@ public class TestApexStarterMain { @Test public void testApexStarter_Help() { final String[] apexStarterConfigParameters = { "-h" }; - ApexStarterMain.main(apexStarterConfigParameters); + assertThatCode(() -> ApexStarterMain.main(apexStarterConfigParameters)).doesNotThrowAnyException(); } @Test |