diff options
Diffstat (limited to 'datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/ProvServerTest.java')
-rw-r--r-- | datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/ProvServerTest.java | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/ProvServerTest.java b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/ProvServerTest.java index a915fa84..1528a563 100644 --- a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/ProvServerTest.java +++ b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/ProvServerTest.java @@ -20,38 +20,28 @@ package org.onap.dmaap.datarouter.provisioning; -import java.io.File; -import java.io.IOException; import org.apache.commons.lang3.reflect.FieldUtils; import org.junit.Assert; -import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.onap.dmaap.datarouter.provisioning.utils.AafPropsUtils; +import org.junit.runner.RunWith; +import org.powermock.core.classloader.annotations.PowerMockIgnore; +import org.powermock.modules.junit4.PowerMockRunner; +@RunWith(PowerMockRunner.class) +@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "org.w3c.*"}) public class ProvServerTest { - private AafPropsUtils aafPropsUtils; - - @Before - public void setUp() { - try { - aafPropsUtils = new AafPropsUtils(new File("src/test/resources/aaf/org.onap.dmaap-dr.props")); - } catch (IOException e) { - e.printStackTrace(); - } - } - @BeforeClass public static void init() { System.setProperty( "org.onap.dmaap.datarouter.provserver.properties", - "src/test/resources/h2DatabaseTlsDisabled.properties"); + "src/test/resources/h2Database.properties"); } @Test public void Verify_Prov_Server_Is_Configured_Correctly() throws IllegalAccessException { - FieldUtils.writeDeclaredStaticField(ProvRunner.class, "aafPropsUtils", aafPropsUtils, true); + FieldUtils.writeDeclaredStaticField(ProvRunner.class, "tlsEnabled", false, true); Assert.assertNotNull(ProvServer.getServerInstance()); } } |