X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fpolicyagent%2FMockPolicyAgent.java;h=b0f1e7f4d41aabd92bbda15d0ad4d81163b37b98;hb=5e8fe3d5256872bda413aabb66cf217e6ef30cef;hp=bbbc06d2274e8324489a06668ca8e9894c17f38f;hpb=be84d0b846398b9684f9ddba2ef4f60a23cd5eb0;p=nonrtric.git diff --git a/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java b/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java index bbbc06d2..b0f1e7f4 100644 --- a/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java +++ b/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java @@ -61,7 +61,7 @@ public class MockPolicyAgent { } /** - * overrides the BeanFactory + * Overrides the BeanFactory. */ @TestConfiguration static class TestBeanFactory { @@ -121,7 +121,6 @@ public class MockPolicyAgent { } } } - } @LocalServerPort @@ -139,12 +138,14 @@ public class MockPolicyAgent { } private static String title(String jsonSchema) { - JsonObject parsedSchema = (JsonObject) new JsonParser().parse(jsonSchema); + JsonObject parsedSchema = (JsonObject) JsonParser.parseString(jsonSchema); String title = parsedSchema.get("title").getAsString(); return title; } @Test + @SuppressWarnings("squid:S2699") // Tests should include assertions. This test is only for keeping the server alive, + // so it will only be confusing to add an assertion. public void runMock() throws Exception { keepServerAlive(); }