- public void testGetPolicyTypeIdentities() {
- SdncOscAdapterInput inputParams = ImmutableSdncOscAdapterInput.builder() //
- .nearRtRicUrl(RIC_1_URL) //
+ void getPolicyTypeIdentities_STD() {
+ List<String> policyTypeIds = clientUnderTest.getPolicyTypeIdentities().block();
+ assertEquals(1, policyTypeIds.size(), "should hardcoded to one");
+ assertEquals("", policyTypeIds.get(0), "should hardcoded to empty");
+ }
+
+ @Test
+ void getPolicyTypeIdentities_OSC() {
+ clientUnderTest = new SdncOscA1Client(A1ProtocolType.SDNC_OSC_OSC_V1, //
+ A1ClientHelper.createRic(RIC_1_URL).getConfig(), //
+ controllerConfig(), asyncRestClientMock);
+
+ String response = createOkResponseWithBody(Arrays.asList(POLICY_TYPE_1_ID));
+ whenAsyncPostThenReturn(Mono.just(response));
+
+ List<String> policyTypeIds = clientUnderTest.getPolicyTypeIdentities().block();
+
+ assertEquals(1, policyTypeIds.size());
+ assertEquals(POLICY_TYPE_1_ID, policyTypeIds.get(0));
+
+ String expUrl = RIC_1_URL + "/a1-p/policytypes";
+ ImmutableAdapterRequest expectedParams = ImmutableAdapterRequest.builder() //
+ .nearRtRicUrl(expUrl) //