summaryrefslogtreecommitdiffstats
path: root/ECOMP-PDP-REST
diff options
context:
space:
mode:
authorRavindra Bakkamanthala <rb7147@att.com>2017-05-15 12:53:18 -0400
committerRavindra Bakkamanthala <rb7147@att.com>2017-05-15 13:55:23 -0400
commit7e547eaa55920dfbc9691eab33bb728395b50cf2 (patch)
tree5d0d64928b4754f65b427cb79b43718f16019582 /ECOMP-PDP-REST
parentdda032f8bb161d54eb1f59de2b4a3efb774fc4d1 (diff)
Policy TestSuite Enabled
Change-Id: I9f98c7dcdcf98713d73544956d873a84fc82adf7 Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
Diffstat (limited to 'ECOMP-PDP-REST')
-rw-r--r--ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationController.java1
-rw-r--r--ECOMP-PDP-REST/src/test/java/org/openecomp/policy/pdp/rest/XACMLPdpServletTest.java34
2 files changed, 17 insertions, 18 deletions
diff --git a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationController.java b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationController.java
index 14d7aa165..4c933776c 100644
--- a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationController.java
+++ b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationController.java
@@ -186,7 +186,6 @@ public class NotificationController {
NotificationServer.sendNotification(notificationJSON, propNotificationType, pdpURL);
} catch (Exception e) {
LOGGER.info(XACMLErrorConstants.ERROR_PROCESS_FLOW + "Error in sending the Event Notification: "+ e.getMessage());
- e.printStackTrace();
}
notificationFlag = false;
}
diff --git a/ECOMP-PDP-REST/src/test/java/org/openecomp/policy/pdp/rest/XACMLPdpServletTest.java b/ECOMP-PDP-REST/src/test/java/org/openecomp/policy/pdp/rest/XACMLPdpServletTest.java
index 808f421ff..7f302ffa8 100644
--- a/ECOMP-PDP-REST/src/test/java/org/openecomp/policy/pdp/rest/XACMLPdpServletTest.java
+++ b/ECOMP-PDP-REST/src/test/java/org/openecomp/policy/pdp/rest/XACMLPdpServletTest.java
@@ -33,8 +33,6 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import junit.framework.TestCase;
-
import org.junit.Before;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
@@ -51,6 +49,8 @@ import org.springframework.mock.web.MockServletConfig;
import com.mockrunner.mock.web.MockServletInputStream;
+import junit.framework.TestCase;
+
@RunWith(PowerMockRunner.class)
@PrepareForTest(IntegrityMonitor.class) // so PowerMock can mock static method of IntegrityMonitor
public class XACMLPdpServletTest extends TestCase{
@@ -127,7 +127,7 @@ public class XACMLPdpServletTest extends TestCase{
pdpServlet.init(servletConfig);
assertTrue(true);
} catch (Exception e) {
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
@@ -143,7 +143,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch(Exception e){
System.out.println("Unexpected exception in testDoGetNoTypeError");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -159,7 +159,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoGetConfigType");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
@@ -176,7 +176,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch(Exception e){
System.out.println("Unexpected exception in testDoGetTypeHb");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -190,7 +190,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch(Exception e){
System.out.println("Unexpected exception in testDoGetTypeStatus");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -203,7 +203,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPost");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -219,7 +219,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPostToLong");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -235,7 +235,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPostContentLengthNegative");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -251,7 +251,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPostContentTypeNonValid");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -267,7 +267,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPostContentTypeConfigurationError");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -286,7 +286,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPutCacheEmpty");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -307,7 +307,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPutConfigPolicies");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -326,7 +326,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPutToLong");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -345,7 +345,7 @@ public class XACMLPdpServletTest extends TestCase{
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPutInvalidContentType");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
@@ -358,7 +358,7 @@ public class XACMLPdpServletTest extends TestCase{
pdpServlet.destroy();
}catch(Exception e){
System.out.println("Unexpected exception in testDestroy");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}