X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Fclients%2FOscA1ClientTest.java;h=d23276dfdcfb5899844faa20c83ef43d85cdf638;hb=6a39814272307d0207222c9229b0d765ac062bf0;hp=5023d1007ff5e7eb67eeb5a7bda29936d67d927f;hpb=d15a3b60b7dc968bd17f32063508c7dc6defc03a;p=nonrtric.git diff --git a/policy-agent/src/test/java/org/oransc/policyagent/clients/OscA1ClientTest.java b/policy-agent/src/test/java/org/oransc/policyagent/clients/OscA1ClientTest.java index 5023d100..d23276df 100644 --- a/policy-agent/src/test/java/org/oransc/policyagent/clients/OscA1ClientTest.java +++ b/policy-agent/src/test/java/org/oransc/policyagent/clients/OscA1ClientTest.java @@ -43,7 +43,7 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @ExtendWith(MockitoExtension.class) -public class OscA1ClientTest { +class OscA1ClientTest { private static final String RIC_URL = "RicUrl"; @@ -65,18 +65,19 @@ public class OscA1ClientTest { AsyncRestClient asyncRestClientMock; @BeforeEach - public void init() { + void init() { RicConfig ricConfig = ImmutableRicConfig.builder() // .name("name") // .baseUrl("RicBaseUrl") // .managedElementIds(new ArrayList<>()) // + .controllerName("") // .build(); asyncRestClientMock = mock(AsyncRestClient.class); clientUnderTest = new OscA1Client(ricConfig, asyncRestClientMock); } @Test - public void testGetPolicyTypeIdentities() { + void testGetPolicyTypeIdentities() { List policyTypeIds = Arrays.asList(POLICY_TYPE_1_ID, POLICY_TYPE_2_ID); Mono policyTypeIdsResp = Mono.just(policyTypeIds.toString()); when(asyncRestClientMock.get(anyString())).thenReturn(policyTypeIdsResp); @@ -87,7 +88,7 @@ public class OscA1ClientTest { } @Test - public void testGetPolicyIdentities() { + void testGetPolicyIdentities() { Mono policyTypeIdsResp = Mono.just(Arrays.asList(POLICY_TYPE_1_ID, POLICY_TYPE_2_ID).toString()); Mono policyIdsType1Resp = Mono.just(Arrays.asList(POLICY_1_ID).toString()); Mono policyIdsType2Resp = Mono.just(Arrays.asList(POLICY_2_ID).toString()); @@ -103,7 +104,7 @@ public class OscA1ClientTest { } @Test - public void testGetValidPolicyType() { + void testGetValidPolicyType() { String policyType = "{\"create_schema\": " + POLICY_TYPE_SCHEMA_VALID + "}"; Mono policyTypeResp = Mono.just(policyType); @@ -116,7 +117,7 @@ public class OscA1ClientTest { } @Test - public void testGetInValidPolicyTypeJson() { + void testGetInValidPolicyTypeJson() { String policyType = "{\"create_schema\": " + POLICY_TYPE_SCHEMA_INVALID + "}"; Mono policyTypeResp = Mono.just(policyType); @@ -128,7 +129,7 @@ public class OscA1ClientTest { } @Test - public void testGetPolicyTypeWithoutCreateSchema() { + void testGetPolicyTypeWithoutCreateSchema() { Mono policyTypeResp = Mono.just(POLICY_TYPE_SCHEMA_VALID); when(asyncRestClientMock.get(anyString())).thenReturn(policyTypeResp); @@ -139,7 +140,7 @@ public class OscA1ClientTest { } @Test - public void testPutPolicy() { + void testPutPolicy() { when(asyncRestClientMock.put(anyString(), anyString())).thenReturn(Mono.empty()); clientUnderTest @@ -149,7 +150,7 @@ public class OscA1ClientTest { } @Test - public void testDeletePolicy() { + void testDeletePolicy() { when(asyncRestClientMock.delete(anyString())).thenReturn(Mono.empty()); Mono returnedMono = clientUnderTest @@ -159,7 +160,7 @@ public class OscA1ClientTest { } @Test - public void testDeleteAllPolicies() { + void testDeleteAllPolicies() { Mono policyTypeIdsResp = Mono.just(Arrays.asList(POLICY_TYPE_1_ID, POLICY_TYPE_2_ID).toString()); Mono policyIdsType1Resp = Mono.just(Arrays.asList(POLICY_1_ID).toString()); Mono policyIdsType2Resp = Mono.just(Arrays.asList(POLICY_2_ID).toString());