From c8c5bc2997725b072b3ef762b768446061a0b6f2 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Wed, 24 Aug 2022 09:00:54 +0300 Subject: [PATCH] #107 qulice 0.22.0 --- pom.xml | 2 +- .../org/xembly/saxon/SaxonSampleTest.java | 6 ++-- .../org/xembly/xerces/XercesSampleTest.java | 6 ++-- .../java/org/xembly/AddDirectiveTest.java | 4 +-- .../java/org/xembly/AddIfDirectiveTest.java | 6 ++-- src/test/java/org/xembly/ArgTest.java | 9 +++-- .../java/org/xembly/AttrDirectiveTest.java | 8 ++--- .../java/org/xembly/CommentDirectiveTest.java | 4 +-- src/test/java/org/xembly/DirectivesTest.java | 36 +++++++++---------- src/test/java/org/xembly/DomStackTest.java | 6 ++-- src/test/java/org/xembly/NsDirectiveTest.java | 4 +-- src/test/java/org/xembly/PiDirectiveTest.java | 10 +++--- .../java/org/xembly/RemoveDirectiveTest.java | 6 ++-- .../java/org/xembly/SetDirectiveTest.java | 8 ++--- .../java/org/xembly/StrictDirectiveTest.java | 10 +++--- .../java/org/xembly/SyntaxExceptionTest.java | 4 +-- src/test/java/org/xembly/UpDirectiveTest.java | 6 ++-- .../java/org/xembly/XattrDirectiveTest.java | 4 +-- src/test/java/org/xembly/XemblerTest.java | 22 ++++++------ .../java/org/xembly/XpathDirectiveTest.java | 12 +++---- .../java/org/xembly/XsetDirectiveTest.java | 6 ++-- .../org/xembly/prof/DirectivesProfTest.java | 4 +-- .../java/org/xembly/prof/XemblerProfTest.java | 4 +-- 23 files changed, 93 insertions(+), 94 deletions(-) diff --git a/pom.xml b/pom.xml index d3c2ae3..9bbecc5 100644 --- a/pom.xml +++ b/pom.xml @@ -293,7 +293,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE. com.qulice qulice-maven-plugin - 0.21.1 + 0.22.0 findbugs:.* diff --git a/src/it/saxon/src/test/java/org/xembly/saxon/SaxonSampleTest.java b/src/it/saxon/src/test/java/org/xembly/saxon/SaxonSampleTest.java index 9fa22d0..4b2fa6b 100644 --- a/src/it/saxon/src/test/java/org/xembly/saxon/SaxonSampleTest.java +++ b/src/it/saxon/src/test/java/org/xembly/saxon/SaxonSampleTest.java @@ -41,10 +41,10 @@ * Test of XML features with Saxon. * @since 0.17 */ -public final class SaxonSampleTest { +final class SaxonSampleTest { @Test - public void buildsDocument() throws Exception { + void buildsDocument() throws Exception { MatcherAssert.assertThat( new Xembler( new Directives().add("root") @@ -56,7 +56,7 @@ public void buildsDocument() throws Exception { } @Test - public void appliesChangesToNode() throws Exception { + void appliesChangesToNode() throws Exception { final Node node = new XMLDocument("").node(); new Xembler( new Directives().xpath("/doc") diff --git a/src/it/xerces/src/test/java/org/xembly/xerces/XercesSampleTest.java b/src/it/xerces/src/test/java/org/xembly/xerces/XercesSampleTest.java index c6fc818..0c79f44 100644 --- a/src/it/xerces/src/test/java/org/xembly/xerces/XercesSampleTest.java +++ b/src/it/xerces/src/test/java/org/xembly/xerces/XercesSampleTest.java @@ -41,10 +41,10 @@ * Test of XML features with Xerces. * @since 0.17 */ -public final class XercesSampleTest { +final class XercesSampleTest { @Test - public void buildsDocument() throws Exception { + void buildsDocument() throws Exception { MatcherAssert.assertThat( new Xembler( new Directives().add("root") @@ -56,7 +56,7 @@ public void buildsDocument() throws Exception { } @Test - public void appliesChangesToNode() throws Exception { + void appliesChangesToNode() throws Exception { final Node node = new XMLDocument("").node(); new Xembler( new Directives().xpath("/doc") diff --git a/src/test/java/org/xembly/AddDirectiveTest.java b/src/test/java/org/xembly/AddDirectiveTest.java index 14f8c40..597978c 100644 --- a/src/test/java/org/xembly/AddDirectiveTest.java +++ b/src/test/java/org/xembly/AddDirectiveTest.java @@ -40,10 +40,10 @@ * * @since 0.1 */ -public final class AddDirectiveTest { +final class AddDirectiveTest { @Test - public void addsNodesToCurrentNodes() throws Exception { + void addsNodesToCurrentNodes() throws Exception { final Iterable dirs = new Directives( "ADD 'root'; ADD 'foo'; ADD 'x'; UP; UP; ADD 'bar'; UP; ADD 'bar';" ); diff --git a/src/test/java/org/xembly/AddIfDirectiveTest.java b/src/test/java/org/xembly/AddIfDirectiveTest.java index 752a2db..b6a2d50 100644 --- a/src/test/java/org/xembly/AddIfDirectiveTest.java +++ b/src/test/java/org/xembly/AddIfDirectiveTest.java @@ -42,10 +42,10 @@ * * @since 0.1 */ -public final class AddIfDirectiveTest { +final class AddIfDirectiveTest { @Test - public void addsNodesToCurrentNodes() throws Exception { + void addsNodesToCurrentNodes() throws Exception { final Iterable dirs = new Directives( "ADD 'root'; ADD 'foo'; UP; ADDIF 'bar'; UP; ADDIF 'bar';" ); @@ -62,7 +62,7 @@ public void addsNodesToCurrentNodes() throws Exception { } @Test - public void addsDomNodesDirectly() throws Exception { + void addsDomNodesDirectly() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Element root = dom.createElement("xxx"); diff --git a/src/test/java/org/xembly/ArgTest.java b/src/test/java/org/xembly/ArgTest.java index 29a8412..c730fc2 100644 --- a/src/test/java/org/xembly/ArgTest.java +++ b/src/test/java/org/xembly/ArgTest.java @@ -39,11 +39,10 @@ * * @since 0.1 */ -public final class ArgTest { +final class ArgTest { @Test - @SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops") - public void escapesAndUnescaped() throws Exception { + void escapesAndUnescaped() throws Exception { final String[] texts = { "", "123", @@ -59,7 +58,7 @@ public void escapesAndUnescaped() throws Exception { } @Test - public void rejectsToEscapeInvalidXmlChars() { + void rejectsToEscapeInvalidXmlChars() { Assertions.assertThrows( XmlContentException.class, () -> new Arg("\u001b\u0000").toString() @@ -67,7 +66,7 @@ public void rejectsToEscapeInvalidXmlChars() { } @Test - public void rejectsToUnEscapeInvalidXmlChars() { + void rejectsToUnEscapeInvalidXmlChars() { Assertions.assertThrows( XmlContentException.class, () -> Arg.unescape("�") diff --git a/src/test/java/org/xembly/AttrDirectiveTest.java b/src/test/java/org/xembly/AttrDirectiveTest.java index 9644ae6..77d81dd 100644 --- a/src/test/java/org/xembly/AttrDirectiveTest.java +++ b/src/test/java/org/xembly/AttrDirectiveTest.java @@ -43,10 +43,10 @@ * * @since 0.1 */ -public final class AttrDirectiveTest { +final class AttrDirectiveTest { @Test - public void addsAttributesToCurrentNodes() throws Exception { + void addsAttributesToCurrentNodes() throws Exception { final Iterable dirs = new Directives( StringUtils.join( new String[]{ @@ -68,7 +68,7 @@ public void addsAttributesToCurrentNodes() throws Exception { } @Test - public void addsDomAttributesDirectly() throws Exception { + void addsDomAttributesDirectly() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Element root = dom.createElement("xxx"); @@ -88,7 +88,7 @@ public void addsDomAttributesDirectly() throws Exception { } @Test - public void addsCaseSensitiveAttributesDirectly() throws Exception { + void addsCaseSensitiveAttributesDirectly() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Element root = dom.createElement("f"); diff --git a/src/test/java/org/xembly/CommentDirectiveTest.java b/src/test/java/org/xembly/CommentDirectiveTest.java index 44110e7..ec28ac6 100644 --- a/src/test/java/org/xembly/CommentDirectiveTest.java +++ b/src/test/java/org/xembly/CommentDirectiveTest.java @@ -40,10 +40,10 @@ * * @since 0.1 */ -public final class CommentDirectiveTest { +final class CommentDirectiveTest { @Test - public void addsComment() throws Exception { + void addsComment() throws Exception { final Iterable dirs = new Directives( "ADD 'root'; ADD 'foo'; COMMENT 'How are you?';" ); diff --git a/src/test/java/org/xembly/DirectivesTest.java b/src/test/java/org/xembly/DirectivesTest.java index a48f07e..937a58a 100644 --- a/src/test/java/org/xembly/DirectivesTest.java +++ b/src/test/java/org/xembly/DirectivesTest.java @@ -50,10 +50,10 @@ * @since 0.1 */ @SuppressWarnings({"PMD.TooManyMethods", "PMD.AvoidDuplicateLiterals"}) -public final class DirectivesTest { +final class DirectivesTest { @Test - public void makesXmlDocument() throws Exception { + void makesXmlDocument() throws Exception { MatcherAssert.assertThat( XhtmlMatchers.xhtml( new Xembler( @@ -73,7 +73,7 @@ public void makesXmlDocument() throws Exception { } @Test - public void parsesIncomingGrammar() { + void parsesIncomingGrammar() { final Iterable dirs = new Directives( "XPATH '//orders[@id=\"152\"]'; SET 'test';" ); @@ -81,7 +81,7 @@ public void parsesIncomingGrammar() { } @Test - public void throwsOnBrokenGrammar() { + void throwsOnBrokenGrammar() { Assertions.assertThrows( SyntaxException.class, () -> new Directives("not a xembly at all") @@ -89,7 +89,7 @@ public void throwsOnBrokenGrammar() { } @Test - public void throwsOnBrokenXmlContent() { + void throwsOnBrokenXmlContent() { Assertions.assertThrows( SyntaxException.class, () -> new Directives("ADD '\u001b';") @@ -97,7 +97,7 @@ public void throwsOnBrokenXmlContent() { } @Test - public void throwsOnBrokenEscapedXmlContent() { + void throwsOnBrokenEscapedXmlContent() { Assertions.assertThrows( SyntaxException.class, () -> new Directives("ADD '';") @@ -105,7 +105,7 @@ public void throwsOnBrokenEscapedXmlContent() { } @Test - public void addsMapOfValues() throws Exception { + void addsMapOfValues() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); dom.appendChild(dom.createElement("root")); @@ -127,7 +127,7 @@ public void addsMapOfValues() throws Exception { } @Test - public void ingoresEmptyInput() { + void ingoresEmptyInput() { MatcherAssert.assertThat( new Directives("\n\t \r"), Matchers.emptyIterable() @@ -135,7 +135,7 @@ public void ingoresEmptyInput() { } @Test - public void performsFullScaleModifications() throws Exception { + void performsFullScaleModifications() throws Exception { final String script = new Directives() .add("html").attr("xmlns", "http://www.w3.org/1999/xhtml") .add("body") @@ -155,7 +155,7 @@ public void performsFullScaleModifications() throws Exception { } @Test - public void copiesExistingNode() throws Exception { + void copiesExistingNode() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Iterable copy = Directives.copyOf( @@ -182,7 +182,7 @@ public void copiesExistingNode() throws Exception { } @Test - public void appendsExistingNode() throws Exception { + void appendsExistingNode() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); new Xembler( @@ -207,7 +207,7 @@ public void appendsExistingNode() throws Exception { } @Test - public void addsElementsCaseSensitively() throws Exception { + void addsElementsCaseSensitively() throws Exception { MatcherAssert.assertThat( new Xembler(new Directives().add("XHtml").addIf("Body")).xml(), XhtmlMatchers.hasXPaths( @@ -218,7 +218,7 @@ public void addsElementsCaseSensitively() throws Exception { } @Test - public void convertsToString() { + void convertsToString() { final Directives dirs = new Directives(); for (int idx = 0; idx < Tv.TEN; ++idx) { dirs.add("HELLO"); @@ -234,7 +234,7 @@ public void convertsToString() { } @Test - public void pushesAndPopsCursor() throws Exception { + void pushesAndPopsCursor() throws Exception { MatcherAssert.assertThat( XhtmlMatchers.xhtml( new Xembler( @@ -255,7 +255,7 @@ public void pushesAndPopsCursor() throws Exception { } @Test - public void prefixesItemsWithNamespaces() throws Exception { + void prefixesItemsWithNamespaces() throws Exception { MatcherAssert.assertThat( new Xembler( new Directives() @@ -269,7 +269,7 @@ public void prefixesItemsWithNamespaces() throws Exception { @Test @Disabled - public void acceptsFromMultipleThreads() throws Exception { + void acceptsFromMultipleThreads() throws Exception { final Directives dirs = new Directives().add("mt6"); new Callable() { @Parallel(threads = Tv.FIFTY) @@ -291,7 +291,7 @@ public Void call() { } @Test - public void addsComments() throws Exception { + void addsComments() throws Exception { MatcherAssert.assertThat( new Xembler( new Directives() @@ -303,7 +303,7 @@ public void addsComments() throws Exception { } @Test - public void appendsDirs() { + void appendsDirs() { MatcherAssert.assertThat( new Directives().add("0").append( new Directives().add("1") diff --git a/src/test/java/org/xembly/DomStackTest.java b/src/test/java/org/xembly/DomStackTest.java index b17386d..c04d686 100644 --- a/src/test/java/org/xembly/DomStackTest.java +++ b/src/test/java/org/xembly/DomStackTest.java @@ -40,10 +40,10 @@ * * @since 0.21 */ -public final class DomStackTest { +final class DomStackTest { @Test - public void addsAndRetrieves() throws Exception { + void addsAndRetrieves() throws Exception { final Directive.Stack stack = new DomStack(); final Directive.Cursor first = Mockito.mock(Directive.Cursor.class); final Directive.Cursor second = Mockito.mock(Directive.Cursor.class); @@ -60,7 +60,7 @@ public void addsAndRetrieves() throws Exception { } @Test - public void throwsExceptionOnEmpty() { + void throwsExceptionOnEmpty() { Assertions.assertThrows( ImpossibleModificationException.class, () -> new DomStack().pop() diff --git a/src/test/java/org/xembly/NsDirectiveTest.java b/src/test/java/org/xembly/NsDirectiveTest.java index a3e0380..de263b6 100644 --- a/src/test/java/org/xembly/NsDirectiveTest.java +++ b/src/test/java/org/xembly/NsDirectiveTest.java @@ -42,9 +42,9 @@ * Validates NsDirective class. * @since 0.19.3 */ -public final class NsDirectiveTest { +final class NsDirectiveTest { @Test - public void setsNsAttr() throws Exception { + void setsNsAttr() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Element root = dom.createElement("f"); diff --git a/src/test/java/org/xembly/PiDirectiveTest.java b/src/test/java/org/xembly/PiDirectiveTest.java index 610e051..a14ec16 100644 --- a/src/test/java/org/xembly/PiDirectiveTest.java +++ b/src/test/java/org/xembly/PiDirectiveTest.java @@ -43,10 +43,10 @@ * Test case for {@link PiDirective}. * @since 0.9 */ -public final class PiDirectiveTest { +final class PiDirectiveTest { @Test - public void addsProcessingInstructionsToDom() throws Exception { + void addsProcessingInstructionsToDom() throws Exception { final Iterable dirs = new Directives( StringUtils.join( new String[] { @@ -69,7 +69,7 @@ public void addsProcessingInstructionsToDom() throws Exception { } @Test - public void addsProcessingInstructionsDirectlyToDom() throws Exception { + void addsProcessingInstructionsDirectlyToDom() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Element root = dom.createElement("xxx"); @@ -85,7 +85,7 @@ public void addsProcessingInstructionsDirectlyToDom() throws Exception { } @Test - public void addsProcessingInstructionsToDomRoot() throws Exception { + void addsProcessingInstructionsToDomRoot() throws Exception { final Iterable dirs = new Directives( "XPATH '/'; PI 'alpha' 'beta \u20ac'; ADD 'x4';" ); @@ -101,7 +101,7 @@ public void addsProcessingInstructionsToDomRoot() throws Exception { } @Test - public void prependsProcessingInstructionsToDomRoot() throws Exception { + void prependsProcessingInstructionsToDomRoot() throws Exception { MatcherAssert.assertThat( new Xembler(new Directives("PI 'a' 'b'; ADD 'c';")).xml(), Matchers.containsString("") diff --git a/src/test/java/org/xembly/RemoveDirectiveTest.java b/src/test/java/org/xembly/RemoveDirectiveTest.java index baf4aeb..59bbf91 100644 --- a/src/test/java/org/xembly/RemoveDirectiveTest.java +++ b/src/test/java/org/xembly/RemoveDirectiveTest.java @@ -43,10 +43,10 @@ * * @since 0.1 */ -public final class RemoveDirectiveTest { +final class RemoveDirectiveTest { @Test - public void removesCurrentNodes() throws Exception { + void removesCurrentNodes() throws Exception { final Iterable dirs = new Directives( StringUtils.join( new String[] { @@ -68,7 +68,7 @@ public void removesCurrentNodes() throws Exception { } @Test - public void removesDomNodesDirectly() throws Exception { + void removesDomNodesDirectly() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Element root = dom.createElement("xxx"); diff --git a/src/test/java/org/xembly/SetDirectiveTest.java b/src/test/java/org/xembly/SetDirectiveTest.java index f08d633..b67ef43 100644 --- a/src/test/java/org/xembly/SetDirectiveTest.java +++ b/src/test/java/org/xembly/SetDirectiveTest.java @@ -44,10 +44,10 @@ * * @since 0.1 */ -public final class SetDirectiveTest { +final class SetDirectiveTest { @Test - public void setsTextContentOfNodes() throws Exception { + void setsTextContentOfNodes() throws Exception { final Iterable dirs = new Directives( StringUtils.join( "ADD 'root'; ADD 'foo';", @@ -68,7 +68,7 @@ public void setsTextContentOfNodes() throws Exception { } @Test - public void rejectsContentWithInvalidXmlCharacters() { + void rejectsContentWithInvalidXmlCharacters() { Assertions.assertThrows( SyntaxException.class, () -> new Directives("ADD 'alpha'; SET 'illegal: �';") @@ -76,7 +76,7 @@ public void rejectsContentWithInvalidXmlCharacters() { } @Test - public void setsTextDirectlyIntoDomNodes() throws Exception { + void setsTextDirectlyIntoDomNodes() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Element root = dom.createElement("xxx"); diff --git a/src/test/java/org/xembly/StrictDirectiveTest.java b/src/test/java/org/xembly/StrictDirectiveTest.java index f242bd7..aa05719 100644 --- a/src/test/java/org/xembly/StrictDirectiveTest.java +++ b/src/test/java/org/xembly/StrictDirectiveTest.java @@ -42,10 +42,10 @@ * * @since 0.1 */ -public final class StrictDirectiveTest { +final class StrictDirectiveTest { @Test - public void checksNumberOfCurrentNodes() throws Exception { + void checksNumberOfCurrentNodes() throws Exception { final Iterable dirs = new Directives( StringUtils.join( "ADD 'root'; ADD 'foo'; ADD 'bar';", @@ -65,7 +65,7 @@ public void checksNumberOfCurrentNodes() throws Exception { } @Test - public void failsWhenNumberOfCurrentNodesIsTooBig() { + void failsWhenNumberOfCurrentNodesIsTooBig() { Assertions.assertThrows( ImpossibleModificationException.class, () -> { @@ -81,7 +81,7 @@ public void failsWhenNumberOfCurrentNodesIsTooBig() { } @Test - public void failsWhenNumberOfCurrentNodesIsZero() { + void failsWhenNumberOfCurrentNodesIsZero() { Assertions.assertThrows( ImpossibleModificationException.class, () -> { @@ -97,7 +97,7 @@ public void failsWhenNumberOfCurrentNodesIsZero() { } @Test - public void failsWhenNumberOfCurrentNodesIsTooSmall() { + void failsWhenNumberOfCurrentNodesIsTooSmall() { Assertions.assertThrows( ImpossibleModificationException.class, () -> { diff --git a/src/test/java/org/xembly/SyntaxExceptionTest.java b/src/test/java/org/xembly/SyntaxExceptionTest.java index c1c603d..755919e 100644 --- a/src/test/java/org/xembly/SyntaxExceptionTest.java +++ b/src/test/java/org/xembly/SyntaxExceptionTest.java @@ -38,10 +38,10 @@ * * @since 1.0 */ -public final class SyntaxExceptionTest { +final class SyntaxExceptionTest { @Test - public void instantiatesException() { + void instantiatesException() { MatcherAssert.assertThat( new SyntaxException("", new IllegalStateException("")), Matchers.notNullValue() diff --git a/src/test/java/org/xembly/UpDirectiveTest.java b/src/test/java/org/xembly/UpDirectiveTest.java index 75446ba..f0f7d19 100644 --- a/src/test/java/org/xembly/UpDirectiveTest.java +++ b/src/test/java/org/xembly/UpDirectiveTest.java @@ -41,10 +41,10 @@ * * @since 0.1 */ -public final class UpDirectiveTest { +final class UpDirectiveTest { @Test - public void jumpsToParentsWhenTheyExist() throws Exception { + void jumpsToParentsWhenTheyExist() throws Exception { final Iterable dirs = new Directives( "ADD 'root'; ADD 'foo'; ADD 'bar'; UP; UP; STRICT '1';" ); @@ -58,7 +58,7 @@ public void jumpsToParentsWhenTheyExist() throws Exception { } @Test - public void throwsWhenNoParents() { + void throwsWhenNoParents() { Assertions.assertThrows( ImpossibleModificationException.class, () -> { diff --git a/src/test/java/org/xembly/XattrDirectiveTest.java b/src/test/java/org/xembly/XattrDirectiveTest.java index debae42..77307d0 100644 --- a/src/test/java/org/xembly/XattrDirectiveTest.java +++ b/src/test/java/org/xembly/XattrDirectiveTest.java @@ -41,10 +41,10 @@ * * @since 0.28 */ -public final class XattrDirectiveTest { +final class XattrDirectiveTest { @Test - public void setsAttributesToCurrentNodes() throws Exception { + void setsAttributesToCurrentNodes() throws Exception { final Iterable dirs = new Directives( StringUtils.join( new String[]{ diff --git a/src/test/java/org/xembly/XemblerTest.java b/src/test/java/org/xembly/XemblerTest.java index 05fed53..1907296 100644 --- a/src/test/java/org/xembly/XemblerTest.java +++ b/src/test/java/org/xembly/XemblerTest.java @@ -53,10 +53,10 @@ * @since 0.1 */ @SuppressWarnings("PMD.TooManyMethods") -public final class XemblerTest { +final class XemblerTest { @Test - public void makesChangesToDomDocument() throws Exception { + void makesChangesToDomDocument() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); new Xembler( @@ -80,7 +80,7 @@ public void makesChangesToDomDocument() throws Exception { } @Test - public void makesChangesToDomDocumentFromBuilder() throws Exception { + void makesChangesToDomDocumentFromBuilder() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Directives builder = new Directives() @@ -110,7 +110,7 @@ public void makesChangesToDomDocumentFromBuilder() throws Exception { } @Test - public void printsXmlDocument() throws Exception { + void printsXmlDocument() throws Exception { MatcherAssert.assertThat( new Xembler( new Directives().add("hey-you").add("hoy").set("\u20ac") @@ -120,7 +120,7 @@ public void printsXmlDocument() throws Exception { } @Test - public void rendersXmlDeclaration() { + void rendersXmlDeclaration() { MatcherAssert.assertThat( new Xembler(new Directives("ADD 'f';")).xmlQuietly(), Matchers.equalTo("\n") @@ -128,7 +128,7 @@ public void rendersXmlDeclaration() { } @Test - public void escapesBrokenText() { + void escapesBrokenText() { MatcherAssert.assertThat( Xembler.escape("привет hello \u0000"), Matchers.equalTo("привет hello \\u0000") @@ -136,7 +136,7 @@ public void escapesBrokenText() { } @Test - public void modifiesClonedNode() throws Exception { + void modifiesClonedNode() throws Exception { final Node node = new XMLDocument("").node().cloneNode(true); new Xembler(new Directives().xpath("/t").add("x")).apply(node); MatcherAssert.assertThat( @@ -146,7 +146,7 @@ public void modifiesClonedNode() throws Exception { } @Test - public void replacesRootNode() throws Exception { + void replacesRootNode() throws Exception { final Node node = new XMLDocument("").node(); new Xembler(new Directives().xpath("/e").remove().add("p")).apply(node); MatcherAssert.assertThat( @@ -156,7 +156,7 @@ public void replacesRootNode() throws Exception { } @Test - public void removesAttribute() throws Exception { + void removesAttribute() throws Exception { final Node node = new XMLDocument("").node(); new Xembler( new Directives() @@ -172,7 +172,7 @@ public void removesAttribute() throws Exception { } @Test - public void removesRootNode() throws Exception { + void removesRootNode() throws Exception { final Node node = new XMLDocument("").node(); new Xembler( new Directives().xpath("/old").remove().add("new") @@ -185,7 +185,7 @@ public void removesRootNode() throws Exception { @Test @Disabled - public void concurrentInvocationWithNoExceptions() throws Exception { + void concurrentInvocationWithNoExceptions() throws Exception { final ExecutorService service = Executors.newFixedThreadPool( Runtime.getRuntime().availableProcessors() ); diff --git a/src/test/java/org/xembly/XpathDirectiveTest.java b/src/test/java/org/xembly/XpathDirectiveTest.java index 5912922..187c070 100644 --- a/src/test/java/org/xembly/XpathDirectiveTest.java +++ b/src/test/java/org/xembly/XpathDirectiveTest.java @@ -45,10 +45,10 @@ * * @since 0.1 */ -public final class XpathDirectiveTest { +final class XpathDirectiveTest { @Test - public void findsNodesWithXpathExpression() throws Exception { + void findsNodesWithXpathExpression() throws Exception { final Iterable dirs = new Directives( StringUtils.join( new String[] { @@ -70,7 +70,7 @@ public void findsNodesWithXpathExpression() throws Exception { } @Test - public void ignoresEmptySearches() throws Exception { + void ignoresEmptySearches() throws Exception { final Iterable dirs = new Directives( "XPATH '/nothing'; XPATH '/top'; STRICT '1'; ADD 'hey';" ); @@ -85,7 +85,7 @@ public void ignoresEmptySearches() throws Exception { } @Test - public void findsNodesByXpathDirectly() throws Exception { + void findsNodesByXpathDirectly() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Element root = dom.createElement("xxx"); @@ -105,7 +105,7 @@ public void findsNodesByXpathDirectly() throws Exception { } @Test - public void findsNodesInEmptyDom() throws Exception { + void findsNodesInEmptyDom() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); MatcherAssert.assertThat( @@ -119,7 +119,7 @@ public void findsNodesInEmptyDom() throws Exception { } @Test - public void findsRootInClonedNode() throws Exception { + void findsRootInClonedNode() throws Exception { final Iterable dirs = new Directives( "XPATH '/*'; STRICT '1'; ADD 'boom-5';" ); diff --git a/src/test/java/org/xembly/XsetDirectiveTest.java b/src/test/java/org/xembly/XsetDirectiveTest.java index 7bde449..bb2713b 100644 --- a/src/test/java/org/xembly/XsetDirectiveTest.java +++ b/src/test/java/org/xembly/XsetDirectiveTest.java @@ -43,10 +43,10 @@ * * @since 0.1 */ -public final class XsetDirectiveTest { +final class XsetDirectiveTest { @Test - public void setsTextContentOfNodes() throws Exception { + void setsTextContentOfNodes() throws Exception { final Iterable dirs = new Directives( StringUtils.join( new String[]{ @@ -70,7 +70,7 @@ public void setsTextContentOfNodes() throws Exception { } @Test - public void setsTextDirectlyIntoDomNodes() throws Exception { + void setsTextDirectlyIntoDomNodes() throws Exception { final Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); final Element root = dom.createElement("xxx"); diff --git a/src/test/java/org/xembly/prof/DirectivesProfTest.java b/src/test/java/org/xembly/prof/DirectivesProfTest.java index 8beb178..bcc1729 100644 --- a/src/test/java/org/xembly/prof/DirectivesProfTest.java +++ b/src/test/java/org/xembly/prof/DirectivesProfTest.java @@ -41,11 +41,11 @@ * @since 0.10.1 */ @Loggable -public final class DirectivesProfTest { +final class DirectivesProfTest { @Test @SuppressWarnings("PMD.InsufficientStringBufferDeclaration") - public void parsesLongProgram() { + void parsesLongProgram() { final StringBuilder program = new StringBuilder(Tv.THOUSAND) .append("ADD 'root';"); for (int idx = 0; idx < Tv.TEN * Tv.THOUSAND; ++idx) { diff --git a/src/test/java/org/xembly/prof/XemblerProfTest.java b/src/test/java/org/xembly/prof/XemblerProfTest.java index e67aecb..bef08de 100644 --- a/src/test/java/org/xembly/prof/XemblerProfTest.java +++ b/src/test/java/org/xembly/prof/XemblerProfTest.java @@ -44,11 +44,11 @@ * @since 0.10.1 */ @Loggable -public final class XemblerProfTest { +final class XemblerProfTest { @Test @SuppressWarnings("PMD.InsufficientStringBufferDeclaration") - public void modifiesDom() throws Exception { + void modifiesDom() throws Exception { final StringBuilder program = new StringBuilder(Tv.THOUSAND) .append("ADD 'root';"); for (int idx = 0; idx < Tv.FIFTY * Tv.THOUSAND; ++idx) {