From eaacb6317efd98f87fde5f2dee1cc9cc1f74aa45 Mon Sep 17 00:00:00 2001 From: bobbymander Date: Tue, 13 Mar 2018 09:07:40 -0400 Subject: JUnit additions for PAP-REST,SDK-APP Issue-ID: POLICY-600 Change-Id: Ie2a3257e26382f68d8cb008dc5ac512d6ac49c8b Signed-off-by: bobbymander --- .../onap/policy/pap/xacml/rest/WebConfigTest.java | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/WebConfigTest.java (limited to 'ONAP-PAP-REST/src/test') diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/WebConfigTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/WebConfigTest.java new file mode 100644 index 000000000..15bdf8962 --- /dev/null +++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/WebConfigTest.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP-PAP-REST + * ================================================================================ + * 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.pap.xacml.rest; + +import static org.junit.Assert.fail; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import org.junit.Test; +import org.mockito.Mockito; + +public class WebConfigTest { + @Test(expected=NullPointerException.class) + public void testNegativeStartup() throws ServletException { + WebConfig init = new WebConfig(); + ServletContext container = Mockito.mock(ServletContext.class); + init.onStartup(container); + fail("Expecting an exception."); + } +} -- cgit 1.2.3-korg