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.std.pap.StdEngine;
35 import com.att.research.xacml.api.pap.PAPException;
37 public class StdEngineTest {
39 private static Logger logger = FlexLogger.getLogger(StdEngineTest.class);
40 private Path repository;
41 Properties properties = new Properties();
42 StdEngine stdEngine = null;
47 repository = Paths.get("src/test/resources/pdps");
49 stdEngine = new StdEngine(repository);
50 } catch (PAPException e) {
52 } catch (IOException e) {
58 public void testGetDefaultGroup(){
60 assertTrue(stdEngine.getDefaultGroup() != null);
61 } catch (PAPException e) {
66 public void testGetGroup(){
68 assertTrue(stdEngine.getGroup("1") == null);
69 } catch (PAPException e) {
76 public void testGetOnapPDPGroups(){
78 assertTrue(stdEngine.getOnapPDPGroups() != null);
79 } catch (PAPException e) {
84 public void testGetPDP(){
86 assertTrue(stdEngine.getPDP("1") == null);
87 } catch (PAPException e) {
92 public void testGetPDPGroup(){
94 assertTrue(stdEngine.getPDPGroup(null) == null);
95 } catch (PAPException e) {