2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.onap.policy.xacml.test.std.pap;
22 import static org.junit.Assert.assertTrue;
24 import java.io.IOException;
25 import java.nio.file.Path;
26 import java.nio.file.Paths;
27 import java.util.Properties;
29 import org.junit.Before;
30 import org.junit.Test;
31 import org.onap.policy.common.logging.flexlogger.FlexLogger;
32 import org.onap.policy.common.logging.flexlogger.Logger;
33 import org.onap.policy.xacml.api.pap.OnapPDP;
34 import org.onap.policy.xacml.std.pap.StdEngine;
36 import com.att.research.xacml.api.pap.PAPException;
37 import com.att.research.xacml.std.pap.StdPDP;
39 public class StdEngineTest {
41 private static Logger logger = FlexLogger.getLogger(StdEngineTest.class);
42 private Path repository;
43 Properties properties = new Properties();
44 StdEngine stdEngine = null;
49 repository = Paths.get("src/test/resources/pdps");
51 stdEngine = new StdEngine(repository);
52 } catch (PAPException e) {
54 } catch (IOException e) {
60 public void testGetDefaultGroup(){
62 assertTrue(stdEngine.getDefaultGroup() != null);
63 } catch (PAPException e) {
68 public void testGetGroup(){
70 assertTrue(stdEngine.getGroup("1") == null);
71 } catch (PAPException e) {
78 public void testGetOnapPDPGroups(){
80 assertTrue(stdEngine.getOnapPDPGroups() != null);
81 } catch (PAPException e) {
86 public void testGetPDP(){
88 assertTrue(stdEngine.getPDP("1") == null);
89 } catch (PAPException e) {
94 public void testGetPDPGroup(){
96 assertTrue(stdEngine.getPDPGroup(null) == null);
97 } catch (PAPException e) {