diff options
author | Jim Hahn <jrh3@att.com> | 2019-06-18 12:25:03 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-06-18 12:25:03 -0400 |
commit | d85174e9054bc63948ec6e07d8fc362e170402a9 (patch) | |
tree | 35d96c98d0780fa01e68427aeb3ef23df134c83b /plugins/forwarding-plugins/src | |
parent | d784d71afce52687442c4753643280eae7cfe2ac (diff) |
Fix junit tests in distribution
Sonar fix broke some of the junit tests for parameters; fixed
those.
Also fixed some checkstyle errors (e.g., unused imports).
Change-Id: I76c57792b82b9c2ddd27bdbc35910e9b11d86ea5
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'plugins/forwarding-plugins/src')
2 files changed, 3 insertions, 4 deletions
diff --git a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderParameterGroupTest.java b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderParameterGroupTest.java index 20528a5a..ec677cb4 100644 --- a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderParameterGroupTest.java +++ b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderParameterGroupTest.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Intel Corp. All rights reserved. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +22,6 @@ package org.onap.policy.distribution.forwarding.file; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; diff --git a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderTest.java b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderTest.java index 9da9c1d2..e474f693 100644 --- a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderTest.java +++ b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderTest.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Intel Corp. All rights reserved. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,19 +31,16 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collection; import java.util.Date; - import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.junit.runner.RunWith; -import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import org.onap.policy.common.parameters.ParameterGroup; import org.onap.policy.common.parameters.ParameterService; -import org.onap.policy.distribution.forwarding.PolicyForwardingException; import org.onap.policy.distribution.model.OptimizationPolicy; import org.onap.policy.distribution.model.Policy; @@ -107,6 +105,7 @@ public class FilePolicyForwarderTest { } @Test + @SuppressWarnings("unchecked") public void testForwardPolicyError() { final Collection<Policy> policies = new ArrayList<>(); OptimizationPolicy policy = new OptimizationPolicy(); |