Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Added STD sim 2.0.0 tests"
[nonrtric.git]
/
policy-agent
/
src
/
test
/
java
/
org
/
oransc
/
policyagent
/
clients
/
SdncOscA1ClientTest.java
diff --git
a/policy-agent/src/test/java/org/oransc/policyagent/clients/SdncOscA1ClientTest.java
b/policy-agent/src/test/java/org/oransc/policyagent/clients/SdncOscA1ClientTest.java
index
d63974e
..
a6f6187
100644
(file)
--- a/
policy-agent/src/test/java/org/oransc/policyagent/clients/SdncOscA1ClientTest.java
+++ b/
policy-agent/src/test/java/org/oransc/policyagent/clients/SdncOscA1ClientTest.java
@@
-96,7
+96,7
@@
class SdncOscA1ClientTest {
@Test
void createClientWithWrongProtocol_thenErrorIsThrown() {
try {
@Test
void createClientWithWrongProtocol_thenErrorIsThrown() {
try {
- new SdncOscA1Client(A1ProtocolType.STD_V1_1, null, null, n
ull
);
+ new SdncOscA1Client(A1ProtocolType.STD_V1_1, null, null, n
ew AsyncRestClient("", null)
);
fail("Should have thrown exception.");
} catch (IllegalArgumentException e) {
return;
fail("Should have thrown exception.");
} catch (IllegalArgumentException e) {
return;
@@
-121,8
+121,8
@@
class SdncOscA1ClientTest {
List<String> policyTypeIds = clientUnderTest.getPolicyTypeIdentities().block();
List<String> policyTypeIds = clientUnderTest.getPolicyTypeIdentities().block();
- assertEquals(1, policyTypeIds.size()
, ""
);
- assertEquals(POLICY_TYPE_1_ID, policyTypeIds.get(0)
, ""
);
+ assertEquals(1, policyTypeIds.size());
+ assertEquals(POLICY_TYPE_1_ID, policyTypeIds.get(0));
String expUrl = RIC_1_URL + "/a1-p/policytypes";
ImmutableAdapterRequest expectedParams = ImmutableAdapterRequest.builder() //
String expUrl = RIC_1_URL + "/a1-p/policytypes";
ImmutableAdapterRequest expectedParams = ImmutableAdapterRequest.builder() //
@@
-137,7
+137,7
@@
class SdncOscA1ClientTest {
void getTypeSchema_STD() {
String policyType = clientUnderTest.getPolicyTypeSchema("").block();
void getTypeSchema_STD() {
String policyType = clientUnderTest.getPolicyTypeSchema("").block();
- assertEquals("{}", policyType
, ""
);
+ assertEquals("{}", policyType);
}
@Test
}
@Test
@@
-164,9
+164,9
@@
class SdncOscA1ClientTest {
String inputString = "[1, \"1\" ]";
List<String> result = SdncJsonHelper.parseJsonArrayOfString(inputString).collectList().block();
String inputString = "[1, \"1\" ]";
List<String> result = SdncJsonHelper.parseJsonArrayOfString(inputString).collectList().block();
- assertEquals(2, result.size()
, ""
);
- assertEquals("1", result.get(0)
, ""
);
- assertEquals("1", result.get(1)
, ""
);
+ assertEquals(2, result.size());
+ assertEquals("1", result.get(0));
+ assertEquals("1", result.get(1));
}
@Test
}
@Test
@@
-177,7
+177,7
@@
class SdncOscA1ClientTest {
List<String> returned = clientUnderTest.getPolicyIdentities().block();
List<String> returned = clientUnderTest.getPolicyIdentities().block();
- assertEquals(2, returned.size()
, ""
);
+ assertEquals(2, returned.size());
ImmutableAdapterRequest expectedParams = ImmutableAdapterRequest.builder() //
.nearRtRicUrl(policiesUrl()) //
ImmutableAdapterRequest expectedParams = ImmutableAdapterRequest.builder() //
.nearRtRicUrl(policiesUrl()) //
@@
-200,7
+200,7
@@
class SdncOscA1ClientTest {
List<String> returned = clientUnderTest.getPolicyIdentities().block();
List<String> returned = clientUnderTest.getPolicyIdentities().block();
- assertEquals(2, returned.size()
, ""
);
+ assertEquals(2, returned.size());
ImmutableAdapterRequest expectedParams = ImmutableAdapterRequest.builder() //
.nearRtRicUrl(RIC_1_URL + "/a1-p/policytypes/type1/policies") //
ImmutableAdapterRequest expectedParams = ImmutableAdapterRequest.builder() //
.nearRtRicUrl(RIC_1_URL + "/a1-p/policytypes/type1/policies") //
@@
-218,7
+218,7
@@
class SdncOscA1ClientTest {
.putPolicy(A1ClientHelper.createPolicy(RIC_1_URL, POLICY_1_ID, POLICY_JSON_VALID, POLICY_TYPE_1_ID))
.block();
.putPolicy(A1ClientHelper.createPolicy(RIC_1_URL, POLICY_1_ID, POLICY_JSON_VALID, POLICY_TYPE_1_ID))
.block();
- assertEquals("OK", returned
, ""
);
+ assertEquals("OK", returned);
final String expUrl = policiesUrl() + "/" + POLICY_1_ID;
AdapterRequest expectedInputParams = ImmutableAdapterRequest.builder() //
.nearRtRicUrl(expUrl) //
final String expUrl = policiesUrl() + "/" + POLICY_1_ID;
AdapterRequest expectedInputParams = ImmutableAdapterRequest.builder() //
.nearRtRicUrl(expUrl) //
@@
-267,7
+267,7
@@
class SdncOscA1ClientTest {
.deletePolicy(A1ClientHelper.createPolicy(RIC_1_URL, POLICY_1_ID, POLICY_JSON_VALID, POLICY_TYPE_1_ID))
.block();
.deletePolicy(A1ClientHelper.createPolicy(RIC_1_URL, POLICY_1_ID, POLICY_JSON_VALID, POLICY_TYPE_1_ID))
.block();
- assertEquals("OK", returned
, ""
);
+ assertEquals("OK", returned);
final String expUrl = policiesUrl() + "/" + POLICY_1_ID;
AdapterRequest expectedInputParams = ImmutableAdapterRequest.builder() //
.nearRtRicUrl(expUrl) //
final String expUrl = policiesUrl() + "/" + POLICY_1_ID;
AdapterRequest expectedInputParams = ImmutableAdapterRequest.builder() //
.nearRtRicUrl(expUrl) //