import org.onap.policy.pap.xacml.rest.util.DictionaryUtils;
import org.onap.policy.rest.dao.CommonClassDao;
import org.onap.policy.rest.jpa.ActionPolicyDict;
-import org.onap.policy.rest.jpa.BRMSParamTemplate;
+import org.onap.policy.rest.jpa.BrmsParamTemplate;
import org.onap.policy.rest.jpa.Category;
import org.onap.policy.rest.jpa.FunctionDefinition;
import org.onap.policy.rest.jpa.PolicyEditorScopes;
editorScope.setUserModifiedBy(userInfo);
Mockito.when(commonClassDao.getEntityItem(PolicyEditorScopes.class, "scopeName", "test"))
.thenReturn(editorScope);
- BRMSParamTemplate template = new BRMSParamTemplate();
+ BrmsParamTemplate template = new BrmsParamTemplate();
template.setRuleName("testPolicy");
template.setUserCreatedBy(userInfo);
String rule = "package com.sample;\n" + "import com.sample.DroolsTest.Message;\n" + "declare Params\n"
+ "Params($param.samPoll > 50)\n" + "then\n" + "System.out.println(\"Firing rule 1\");\n"
+ "System.out.println($param);\n" + "end\n";
template.setRule(rule);
- Mockito.when(commonClassDao.getEntityItem(BRMSParamTemplate.class, "ruleName", "testPolicy"))
+ Mockito.when(commonClassDao.getEntityItem(BrmsParamTemplate.class, "ruleName", "testPolicy"))
.thenReturn(template);
}
// Verify
Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
//
- // Check VNFType
+ // Check VnfType
//
httpServletRequest = Mockito.mock(HttpServletRequest.class);
httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
// Verify
Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
//
- // Check PEPOptions
+ // Check PepOptions
//
httpServletRequest = Mockito.mock(HttpServletRequest.class);
httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
json = "{\"dictionaryFields\":{\"pepName\":\"testRestAPI\",\"description\":\"testing create\","
+ "\"attributes\":[{\"option\":\"test1\",\"number\":\"test\"},{\"option\":\"test2\","
+ "\"number\":\"test\"}]}}";
- dictionaryTestSetup(false, "PEPOptions", json);
+ dictionaryTestSetup(false, "PepOptions", json);
// send Request to PAP
pap.service(httpServletRequest, httpServletResponse);
// Verify
@Test
public void getDictionary() throws ServletException, IOException {
String[] dictionarys = new String[] {"Attribute", "OnapName", "Action", "BRMSParamTemplate", "VSCLAction",
- "VNFType", "PEPOptions", "Varbind", "Service", "Site", "Settings", "RainyDayTreatments",
+ "VNFType", "PepOptions", "Varbind", "Service", "Site", "Settings", "RainyDayTreatments",
"DescriptiveScope", "ActionList", "ProtocolList", "Zone", "SecurityZone", "PrefixList", "AddressGroup",
"ServiceGroup", "ServiceList", "TermList", "MicroServiceLocation", "MicroServiceConfigName", "DCAEUUID",
"MicroServiceModels", "PolicyScopeService", "PolicyScopeResource", "PolicyScopeType",