X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2FTestUtils.java;h=ed1529540dc4fedde6fa803b909b5827e1241c79;hp=449b79923edd40e0c21f922ba3ff6c271e45d3c5;hb=refs%2Fchanges%2F27%2F8927%2F3;hpb=cb210bea2ab44aa2922ed86232c9db9a10452fc0 diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/TestUtils.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/TestUtils.java index 449b79923e..ed1529540d 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/TestUtils.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/TestUtils.java @@ -147,10 +147,9 @@ public final class TestUtils { /** * - * Fill missing data (namespaces) and build correct data type in - * {@code compositeNode} according to {@code dataSchemaNode}. The method - * {@link RestconfImpl#createConfigurationData createConfigurationData} is - * used because it contains calling of method {code normalizeNode} + * Fill missing data (namespaces) and build correct data type in {@code compositeNode} according to + * {@code dataSchemaNode}. The method {@link RestconfImpl#createConfigurationData createConfigurationData} is used + * because it contains calling of method {code normalizeNode} */ public static void normalizeCompositeNode(CompositeNode compositeNode, Set modules, String schemaNodePath) { RestconfImpl restconf = RestconfImpl.getInstance(); @@ -161,9 +160,8 @@ public final class TestUtils { } /** - * Searches module with name {@code searchedModuleName} in {@code modules}. - * If module name isn't specified and module set has only one element then - * this element is returned. + * Searches module with name {@code searchedModuleName} in {@code modules}. If module name isn't specified and + * module set has only one element then this element is returned. * */ public static Module resolveModule(String searchedModuleName, Set modules) { @@ -279,8 +277,8 @@ public final class TestUtils { ControllerContext.getInstance().setSchemas(loadSchemaContext(modules)); - messageBodyWriter.writeTo(new StructuredData(compositeNode, dataSchemaNode, null), null, null, null, null, null, - byteArrayOS); + messageBodyWriter.writeTo(new StructuredData(compositeNode, dataSchemaNode, null), null, null, null, null, + null, byteArrayOS); return byteArrayOS.toString(); } @@ -298,7 +296,7 @@ public final class TestUtils { return result.toString(); } - private static Pattern patternForStringsSeparatedByWhiteChars(String ... substrings ) { + private static Pattern patternForStringsSeparatedByWhiteChars(String... substrings) { StringBuilder pattern = new StringBuilder(); pattern.append(".*"); for (String substring : substrings) { @@ -309,7 +307,7 @@ public final class TestUtils { return Pattern.compile(pattern.toString(), Pattern.DOTALL); } - public static boolean containsStringData(String jsonOutput,String ...substrings ) { + public static boolean containsStringData(String jsonOutput, String... substrings) { Pattern pattern = patternForStringsSeparatedByWhiteChars(substrings); Matcher matcher = pattern.matcher(jsonOutput); return matcher.matches();