diff --git a/core/src/test/java/org/spongepowered/configurate/AbstractConfigurationNodeTest.java b/core/src/test/java/org/spongepowered/configurate/AbstractConfigurationNodeTest.java index b285b9cdc..c94ba2e90 100644 --- a/core/src/test/java/org/spongepowered/configurate/AbstractConfigurationNodeTest.java +++ b/core/src/test/java/org/spongepowered/configurate/AbstractConfigurationNodeTest.java @@ -48,7 +48,7 @@ public class AbstractConfigurationNodeTest { @Test - public void testUnattachedNodesTemporary() { + void testUnattachedNodesTemporary() { final ConfigurationNode config = BasicConfigurationNode.root(); final ConfigurationNode node = config.getNode("some", "node"); assertTrue(node.isVirtual()); @@ -64,7 +64,7 @@ public void testUnattachedNodesTemporary() { } @Test - public void testNodeCreation() { + void testNodeCreation() { final ConfigurationNode config = BasicConfigurationNode.root(); final ConfigurationNode uncreatedNode = config.getNode("uncreated", "node"); assertTrue(uncreatedNode.isVirtual()); // Just in case @@ -78,7 +78,7 @@ public void testNodeCreation() { } @Test - public void testTraversingNodeCreation() { + void testTraversingNodeCreation() { final ConfigurationNode config = BasicConfigurationNode.root(); final ConfigurationNode nodeOne = config.getNode("uncreated", "step", "node").setValue("one"); final ConfigurationNode nodeTwo = config.getNode("uncreated", "step", "color").setValue("lilac"); @@ -88,14 +88,14 @@ public void testTraversingNodeCreation() { } @Test - public void testGetDefaultValue() { + void testGetDefaultValue() { final ConfigurationNode root = BasicConfigurationNode.root(); final Object testObj = new Object(); assertEquals(testObj, root.getNode("nonexistent").getValue(testObj)); } @Test - public void testGetChildrenMap() { + void testGetChildrenMap() { final ConfigurationNode root = BasicConfigurationNode.root(); final ConfigurationNode a = root.getNode("a").setValue("one"); final ConfigurationNode b = root.getNode("b").setValue("two"); @@ -106,7 +106,7 @@ public void testGetChildrenMap() { } @Test - public void testGetChildrenList() { + void testGetChildrenList() { final ConfigurationNode root = BasicConfigurationNode.root(); final ConfigurationNode a = root.appendListNode().setValue("one"); final ConfigurationNode b = root.appendListNode().setValue("two"); @@ -125,7 +125,7 @@ public void testGetChildrenList() { } @Test - public void testMapUnpacking() { + void testMapUnpacking() { final ConfigurationNode root = BasicConfigurationNode.root(); root.setValue(TEST_MAP); assertEquals("value", root.getNode("key").getValue()); @@ -133,7 +133,7 @@ public void testMapUnpacking() { } @Test - public void testMapPacking() { + void testMapPacking() { final ConfigurationNode root = BasicConfigurationNode.root(); root.getNode("key").setValue("value"); root.getNode("fabulous").setValue(true); @@ -142,7 +142,7 @@ public void testMapPacking() { } @Test - public void testListUnpacking() { + void testListUnpacking() { final ConfigurationNode root = BasicConfigurationNode.root(); root.setValue(TEST_LIST); assertEquals("test1", root.getNode(0).getValue()); @@ -150,7 +150,7 @@ public void testListUnpacking() { } @Test - public void testListPacking() { + void testListPacking() { final ConfigurationNode root = BasicConfigurationNode.root(); root.appendListNode().setValue("test1"); root.appendListNode().setValue("test2"); @@ -158,7 +158,7 @@ public void testListPacking() { } @Test - public void testSingleListConversion() { + void testSingleListConversion() { final ConfigurationNode config = BasicConfigurationNode.root(); final ConfigurationNode node = config.getNode("test", "value"); node.setValue("test"); @@ -168,7 +168,7 @@ public void testSingleListConversion() { } @Test - public void testSettingNullRemoves() { + void testSettingNullRemoves() { final ConfigurationNode root = BasicConfigurationNode.root(); final ConfigurationNode child = root.getNode("child").setValue("a"); assertFalse(child.isVirtual()); @@ -179,13 +179,13 @@ public void testSettingNullRemoves() { } @Test - public void testGetPath() { + void testGetPath() { final ConfigurationNode root = BasicConfigurationNode.root(); assertArrayEquals(new Object[]{"a", "b", "c"}, root.getNode("a", "b", "c").getPath().getArray()); } @Test - public void testMergeValues() { + void testMergeValues() { final ConfigurationNode first = BasicConfigurationNode.root(); final ConfigurationNode second = BasicConfigurationNode.root(); first.getNode("scalar").setValue("one"); @@ -214,7 +214,7 @@ public void testMergeValues() { } @Test - public void testSettingMultipleTimesWorks() { + void testSettingMultipleTimesWorks() { final ConfigurationNode subject = BasicConfigurationNode.root(); subject.setValue(UnmodifiableCollections.buildMap(build -> { build.put("a", "b"); @@ -231,7 +231,7 @@ public void testSettingMultipleTimesWorks() { } @Test - public void testGetSetValueSerialized() throws ObjectMappingException { + void testGetSetValueSerialized() throws ObjectMappingException { final ConfigurationNode subject = BasicConfigurationNode.root(ConfigurationOptions.defaults() .withNativeTypes(UnmodifiableCollections.toSet(String.class, Integer.class))); subject.setValue("48"); @@ -242,7 +242,7 @@ public void testGetSetValueSerialized() throws ObjectMappingException { } @Test - public void testDefaultsCopied() { + void testDefaultsCopied() { final ConfigurationNode subject = BasicConfigurationNode.root(ConfigurationOptions.defaults().withShouldCopyDefaults(true)); assertNull(subject.getValue()); assertEquals("default value", subject.getValue("default value")); @@ -251,7 +251,7 @@ public void testDefaultsCopied() { @Test @SuppressWarnings("rawtypes") - public void testRawTypeFails() { + void testRawTypeFails() { final ConfigurationNode subject = BasicConfigurationNode.root(b -> { b.getNode("test1").setValue(2); b.getNode("test2").setValue(3); @@ -264,7 +264,7 @@ public void testRawTypeFails() { } @Test - public void testHasChildArray() { + void testHasChildArray() { final ConfigurationNode node = BasicConfigurationNode.root(); assertFalse(node.hasChild("ball")); assertTrue(node.getNode("ball").isVirtual()); @@ -283,7 +283,7 @@ public void testHasChildArray() { } @Test - public void testNullElementsForbiddenHasChild() { + void testNullElementsForbiddenHasChild() { assertThrows(NullPointerException.class, () -> { BasicConfigurationNode.root(n -> n.getNode("test").setValue("blah")) .hasChild("test", null); @@ -291,7 +291,7 @@ public void testNullElementsForbiddenHasChild() { } @Test - public void testHasChildIterable() { + void testHasChildIterable() { final ConfigurationNode node = BasicConfigurationNode.root(); assertFalse(node.hasChild(NodePath.path("ball"))); assertTrue(node.getNode("ball").isVirtual()); @@ -310,7 +310,7 @@ public void testHasChildIterable() { } @Test - public void testNullOutListValue() { + void testNullOutListValue() { BasicConfigurationNode.root(n -> { n.appendListNode().setValue("blah"); n.appendListNode().setValue(null); @@ -324,7 +324,7 @@ public void testNullOutListValue() { private static final RepresentationHint IS_EVIL = RepresentationHint.of("evil", Boolean.class); @Test - public void testHintsReadWrite() { + void testHintsReadWrite() { final ConfigurationNode node = BasicConfigurationNode.root(); node.setValue("I hold hints!"); assertNull(node.getHint(IS_EVIL)); @@ -334,14 +334,14 @@ public void testHintsReadWrite() { } @Test - public void testHintSetToNull() { + void testHintSetToNull() { final ConfigurationNode node = BasicConfigurationNode.root(); node.setHint(IS_EVIL, null); assertNull(node.getHint(IS_EVIL)); } @Test - public void testGetHintInherited() { + void testGetHintInherited() { final ConfigurationNode root = BasicConfigurationNode.root(); root.setHint(IS_EVIL, false); @@ -356,7 +356,7 @@ public void testGetHintInherited() { } @Test - public void testHintsCopied() { + void testHintsCopied() { final ConfigurationNode original = BasicConfigurationNode.root(); original.setValue("1234").setHint(IS_EVIL, true); @@ -369,7 +369,7 @@ public void testHintsCopied() { } @Test - public void testHintsMerged() { + void testHintsMerged() { final ConfigurationNode hintHolder = BasicConfigurationNode.root() .setValue('o') .setHint(IS_EVIL, true); @@ -384,7 +384,7 @@ public void testHintsMerged() { } @Test - public void testCollectToMap() throws ObjectMappingException { + void testCollectToMap() throws ObjectMappingException { final ConfigurationNode target = ImmutableMap.of("one", 3, "two", 28, "test", 14).entrySet().stream() @@ -397,7 +397,7 @@ public void testCollectToMap() throws ObjectMappingException { } @Test - public void testCollectToList() throws ObjectMappingException { + void testCollectToList() throws ObjectMappingException { final BasicConfigurationNode target = IntStream.of(1, 2, 3, 4, 8).boxed() .collect(BasicConfigurationNode.factory().toListCollector(Integer.class)); diff --git a/core/src/test/java/org/spongepowered/configurate/AttributedConfigurationNodeTest.java b/core/src/test/java/org/spongepowered/configurate/AttributedConfigurationNodeTest.java index 4892aaf2d..8eb68c7cb 100644 --- a/core/src/test/java/org/spongepowered/configurate/AttributedConfigurationNodeTest.java +++ b/core/src/test/java/org/spongepowered/configurate/AttributedConfigurationNodeTest.java @@ -24,7 +24,7 @@ public class AttributedConfigurationNodeTest { @Test - public void testIsEmptyIncludesAttributes() { + void testIsEmptyIncludesAttributes() { final AttributedConfigurationNode node = AttributedConfigurationNode.root(); assertTrue(node.isEmpty()); @@ -35,7 +35,7 @@ public void testIsEmptyIncludesAttributes() { } @Test - public void testSettingAttributeAttaches() { + void testSettingAttributeAttaches() { final AttributedConfigurationNode node = AttributedConfigurationNode.root(); final AttributedConfigurationNode child = node.getNode("yoink"); diff --git a/core/src/test/java/org/spongepowered/configurate/ConfigurationVisitorTest.java b/core/src/test/java/org/spongepowered/configurate/ConfigurationVisitorTest.java index 95932b77e..20036dc70 100644 --- a/core/src/test/java/org/spongepowered/configurate/ConfigurationVisitorTest.java +++ b/core/src/test/java/org/spongepowered/configurate/ConfigurationVisitorTest.java @@ -27,7 +27,7 @@ public class ConfigurationVisitorTest { private static final TestVisitor VISITOR = new TestVisitor<>(); @Test - public void testTree() { + void testTree() { final BasicConfigurationNode base = BasicConfigurationNode.root(); base.getNode("cats").act(c -> { @@ -51,14 +51,14 @@ public void testTree() { } @Test - public void testEmptyRoot() { + void testEmptyRoot() { final BasicConfigurationNode base = BasicConfigurationNode.root(); final String result = base.visit(VISITOR); assertEquals("bt", result); } @Test - public void testSingleScalar() { + void testSingleScalar() { final BasicConfigurationNode base = BasicConfigurationNode.root(); base.setValue("test"); final String result = base.visit(VISITOR); @@ -66,7 +66,7 @@ public void testSingleScalar() { } @Test - public void testChangingValueTypeOnEnter() { + void testChangingValueTypeOnEnter() { final ConfigurationVisitor.Safe visitor = new TestVisitor() { @Override public void enterListNode(final BasicConfigurationNode node, final StringBuilder state) { diff --git a/core/src/test/java/org/spongepowered/configurate/CopyTest.java b/core/src/test/java/org/spongepowered/configurate/CopyTest.java index 43ced42e4..0b019ac6e 100644 --- a/core/src/test/java/org/spongepowered/configurate/CopyTest.java +++ b/core/src/test/java/org/spongepowered/configurate/CopyTest.java @@ -29,7 +29,7 @@ public class CopyTest { @Test - public void testSimpleCopy() { + void testSimpleCopy() { final ConfigurationNode node = BasicConfigurationNode.root(); node.getNode("test").setValue(5); node.getNode("section", "val1").setValue(true); @@ -65,7 +65,7 @@ public void testSimpleCopy() { } @Test - public void testCopyPaths() { + void testCopyPaths() { final ConfigurationNode node = BasicConfigurationNode.root(); node.getNode("test").setValue(5); node.getNode("section", "val1").setValue(true); diff --git a/core/src/test/java/org/spongepowered/configurate/SimpleCommentedConfigurationNodeTest.java b/core/src/test/java/org/spongepowered/configurate/SimpleCommentedConfigurationNodeTest.java index 59e7459db..471bc5fc7 100644 --- a/core/src/test/java/org/spongepowered/configurate/SimpleCommentedConfigurationNodeTest.java +++ b/core/src/test/java/org/spongepowered/configurate/SimpleCommentedConfigurationNodeTest.java @@ -24,7 +24,7 @@ public class SimpleCommentedConfigurationNodeTest { @Test - public void testCommentsTransferred() { + void testCommentsTransferred() { final CommentedConfigurationNode subject = CommentedConfigurationNode.root(); final CommentedConfigurationNode firstChild = subject.getNode("first"); firstChild.setValue("test value"); @@ -42,7 +42,7 @@ public void testCommentsTransferred() { } @Test - public void testNestedCommentsTransferred() { + void testNestedCommentsTransferred() { final CommentedConfigurationNode subject = CommentedConfigurationNode.root(); final CommentedConfigurationNode firstChild = subject.getNode("first"); final CommentedConfigurationNode firstChildChild = firstChild.getNode("child"); @@ -61,7 +61,7 @@ public void testNestedCommentsTransferred() { } @Test - public void testCommentsMerged() { + void testCommentsMerged() { final CommentedConfigurationNode source = CommentedConfigurationNode.root(); final CommentedConfigurationNode target = CommentedConfigurationNode.root(); diff --git a/core/src/test/java/org/spongepowered/configurate/loader/AbstractConfigurationLoaderTest.java b/core/src/test/java/org/spongepowered/configurate/loader/AbstractConfigurationLoaderTest.java index 572285b27..2908ef818 100644 --- a/core/src/test/java/org/spongepowered/configurate/loader/AbstractConfigurationLoaderTest.java +++ b/core/src/test/java/org/spongepowered/configurate/loader/AbstractConfigurationLoaderTest.java @@ -35,14 +35,14 @@ public class AbstractConfigurationLoaderTest { @Test - public void testLoadNonexistantPath(final @TempDir Path tempDir) throws IOException { + void testLoadNonexistantPath(final @TempDir Path tempDir) throws IOException { final Path tempPath = tempDir.resolve("text5.txt").getRoot().resolve("does-not-exist-dont-edit-testdir"); final TestConfigurationLoader loader = TestConfigurationLoader.builder().setPath(tempPath).build(); loader.load(); } @Test - public void testLoadNonexistantFile(final @TempDir Path tempDir) throws IOException { + void testLoadNonexistantFile(final @TempDir Path tempDir) throws IOException { final File tempFile = new File(tempDir.resolve("text5.txt").getRoot().toFile(), "does-not-exist-dont-edit-testdir"); final TestConfigurationLoader loader = TestConfigurationLoader.builder().setFile(tempFile).build(); loader.load(); @@ -50,7 +50,7 @@ public void testLoadNonexistantFile(final @TempDir Path tempDir) throws IOExcept @Test @DisabledOnOs(value = OS.WINDOWS, disabledReason = "windows FS has transient permissions issues") - public void testSaveFollowsSymbolicLinks(final @TempDir Path tempDir) throws IOException { + void testSaveFollowsSymbolicLinks(final @TempDir Path tempDir) throws IOException { final Path actualFile = tempDir.resolve(Paths.get("first", "second", "third.json")); Files.createDirectories(actualFile.getParent()); final Path layerOne = tempDir.resolve("general.json"); diff --git a/core/src/test/java/org/spongepowered/configurate/loader/CommentHandlersTest.java b/core/src/test/java/org/spongepowered/configurate/loader/CommentHandlersTest.java index 4b47e1dd2..f2df99853 100644 --- a/core/src/test/java/org/spongepowered/configurate/loader/CommentHandlersTest.java +++ b/core/src/test/java/org/spongepowered/configurate/loader/CommentHandlersTest.java @@ -37,7 +37,7 @@ public class CommentHandlersTest { @Test - public void testExtractBlockCommentHeader() throws IOException { + void testExtractBlockCommentHeader() throws IOException { final String testDocument = "/*\n" + " * First header line\n" + " * more header\n" @@ -56,7 +56,7 @@ public void testExtractBlockCommentHeader() throws IOException { } @Test - public void testExtractSingleLineBlockComment() throws IOException { + void testExtractSingleLineBlockComment() throws IOException { final String testDocument = "/* single line */\n"; try (BufferedReader read = new BufferedReader(new StringReader(testDocument))) { final @Nullable String head = CommentHandlers.SLASH_BLOCK.extractHeader(read); @@ -66,7 +66,7 @@ public void testExtractSingleLineBlockComment() throws IOException { } @Test - public void testExtractLineCommentHeader() throws IOException { + void testExtractLineCommentHeader() throws IOException { final String testDocument = "# First header line\n" + "# more header\n" + "# even more header"; @@ -88,7 +88,7 @@ public void testExtractLineCommentHeader() throws IOException { * @throws IOException not expected within test */ @Test - public void testExtremelyLongLine(final @TempDir Path tempDir) throws IOException { + void testExtremelyLongLine(final @TempDir Path tempDir) throws IOException { final Path testFile = tempDir.resolve("test.json"); try (BufferedWriter w = Files.newBufferedWriter(testFile, StandardCharsets.UTF_8)) { w.write("{test\": \""); diff --git a/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java b/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java index a45d10fc2..5b27b1599 100644 --- a/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java +++ b/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java @@ -46,7 +46,7 @@ private static class TestObject { } @Test - public void testCreateFromNode() throws ObjectMappingException { + void testCreateFromNode() throws ObjectMappingException { final ObjectMapper mapper = ObjectMapper.factory().get(TestObject.class); final BasicConfigurationNode source = BasicConfigurationNode.root(); source.getNode("test-key").setValue("some are born great, some achieve greatness, and some have greatness thrust upon them"); @@ -56,14 +56,14 @@ public void testCreateFromNode() throws ObjectMappingException { } @Test - public void testNullsPreserved() throws ObjectMappingException { + void testNullsPreserved() throws ObjectMappingException { final ObjectMapper mapper = ObjectMapper.factory().get(TestObject.class); final TestObject obj = mapper.load(BasicConfigurationNode.root()); assertNull(obj.stringVal); } @Test - public void testLoadExistingObject() throws ObjectMappingException { + void testLoadExistingObject() throws ObjectMappingException { final ObjectMapper mapper = ObjectMapper.factory().get(TestObject.class); final BasicConfigurationNode source = BasicConfigurationNode.root(); final TestObject instance = new TestObject(); @@ -76,7 +76,7 @@ public void testLoadExistingObject() throws ObjectMappingException { } @Test - public void testDefaultsNotAppiledUnlessCopyDefaults() throws ObjectMappingException { + void testDefaultsNotAppiledUnlessCopyDefaults() throws ObjectMappingException { final ObjectMapper mapper = ObjectMapper.factory().get(TestObject.class); final BasicConfigurationNode source = BasicConfigurationNode.root(); final TestObject instance = new TestObject(); @@ -88,7 +88,7 @@ public void testDefaultsNotAppiledUnlessCopyDefaults() throws ObjectMappingExcep } @Test - public void testDefaultsApplied() throws ObjectMappingException { + void testDefaultsApplied() throws ObjectMappingException { final ObjectMapper mapper = ObjectMapper.factory().get(TestObject.class); final BasicConfigurationNode source = BasicConfigurationNode.root(ConfigurationOptions.defaults().withShouldCopyDefaults(true)); final TestObject instance = new TestObject(); @@ -108,7 +108,7 @@ private static class CommentedObject { } @Test - public void testCommentsApplied() throws ObjectMappingException { + void testCommentsApplied() throws ObjectMappingException { final CommentedConfigurationNode node = CommentedConfigurationNode.root(); final ObjectMapper mapper = ObjectMapper.factory().get(CommentedObject.class); final CommentedObject obj = mapper.load(node); @@ -131,7 +131,7 @@ protected NonZeroArgConstructorObject(final String value) { } @Test - public void testNoArglessConstructor() throws ObjectMappingException { + void testNoArglessConstructor() throws ObjectMappingException { Assertions.assertTrue(assertThrows(ObjectMappingException.class, () -> { final ObjectMapper mapper = ObjectMapper.factory().get(NonZeroArgConstructorObject.class); assertFalse(mapper.canCreateInstances()); @@ -145,7 +145,7 @@ private static class TestObjectChild extends TestObject { } @Test - public void testSuperclassFieldsIncluded() throws ObjectMappingException { + void testSuperclassFieldsIncluded() throws ObjectMappingException { final ObjectMapper mapper = ObjectMapper.factory().get(TestObjectChild.class); final BasicConfigurationNode node = BasicConfigurationNode.root(); node.getNode("child-setting").setValue(true); @@ -162,7 +162,7 @@ private static class FieldNameObject { } @Test - public void testKeyFromFieldName() throws ObjectMappingException { + void testKeyFromFieldName() throws ObjectMappingException { final ObjectMapper mapper = ObjectMapper.factory().get(FieldNameObject.class); final BasicConfigurationNode node = BasicConfigurationNode.root(); node.getNode("loads").setValue(true); @@ -181,7 +181,7 @@ private static class InnerObject { } @Test - public void testNestedObjectWithComments() throws ObjectMappingException { + void testNestedObjectWithComments() throws ObjectMappingException { final CommentedConfigurationNode node = CommentedConfigurationNode.root(ConfigurationOptions.defaults().withShouldCopyDefaults(true)); final ObjectMapper mapper = ObjectMapper.factory().get(ParentObject.class); mapper.load(node); @@ -211,7 +211,7 @@ private static class ContainingObject { } @Test - public void testInterfaceSerialization() throws ObjectMappingException { + void testInterfaceSerialization() throws ObjectMappingException { final ChildObject childObject = new ChildObject(); childObject.test = "Changed value"; @@ -253,7 +253,7 @@ static class ParentTypesResolved extends GenericSerializable { } @Test - public void testGenericTypesResolved() throws ObjectMappingException { + void testGenericTypesResolved() throws ObjectMappingException { final TypeToken> stringSerializable = new TypeToken>() {}; final TypeToken> intSerializable = new TypeToken>() {}; @@ -285,7 +285,7 @@ public void testGenericTypesResolved() throws ObjectMappingException { } @Test - public void testGenericsResolvedThroughSuperclass() throws ObjectMappingException, MalformedURLException { + void testGenericsResolvedThroughSuperclass() throws ObjectMappingException, MalformedURLException { final ObjectMapper mapper = ObjectMapper.factory().get(ParentTypesResolved.class); final BasicConfigurationNode urlNode = BasicConfigurationNode.root(p -> { @@ -303,7 +303,7 @@ public void testGenericsResolvedThroughSuperclass() throws ObjectMappingExceptio } @Test - public void testDirectInterfacesProhibited() { + void testDirectInterfacesProhibited() { assertThrows(ObjectMappingException.class, () -> ObjectMapper.factory().get(ParentInterface.class)); } diff --git a/core/src/test/java/org/spongepowered/configurate/reactive/ProcessorImplTest.java b/core/src/test/java/org/spongepowered/configurate/reactive/ProcessorImplTest.java index 04ce8e0bb..f36663b82 100644 --- a/core/src/test/java/org/spongepowered/configurate/reactive/ProcessorImplTest.java +++ b/core/src/test/java/org/spongepowered/configurate/reactive/ProcessorImplTest.java @@ -34,7 +34,7 @@ private Processor.Iso create() { } @Test - public void testSubmission() { + void testSubmission() { final String[] result = new String[1]; final Processor.Iso proc = create(); proc.subscribe(item -> { @@ -45,7 +45,7 @@ public void testSubmission() { } @Test - public void testUnsubscribe() { + void testUnsubscribe() { final String[] result = new String[1]; final boolean[] closed = new boolean[1]; final Processor.Iso proc = create(); @@ -68,7 +68,7 @@ public void onClose() { } @Test - public void testClose() { + void testClose() { final boolean[] result = new boolean[1]; final Processor.Iso proc = create(); proc.subscribe(new Subscriber() { @@ -89,7 +89,7 @@ public void onClose() { } @Test - public void testCloseIfUnsubscribed() { + void testCloseIfUnsubscribed() { final Processor.Iso proc = create(); final Disposable disp = proc.subscribe(x -> {}); @@ -102,7 +102,7 @@ public void testCloseIfUnsubscribed() { } @Test - public void testMap() { + void testMap() { final String[] items = new String[2]; final Processor.Iso orig = create(); final Publisher mapped = orig.map(x -> "2" + x); @@ -115,7 +115,7 @@ public void testMap() { } @Test - public void testErrorCloses() { + void testErrorCloses() { final int[] callCount = new int[1]; final Processor.Iso subject = create(); final RuntimeException testExc = new RuntimeException(); @@ -144,7 +144,7 @@ public void onError(final Throwable e) { } @Test - public void testMappedUnsubscribedOnEmpty() { + void testMappedUnsubscribedOnEmpty() { final String[] items = new String[2]; final Processor.Iso orig = create(); final Publisher mapped = orig.map(x -> "2" + x); @@ -174,7 +174,7 @@ public void testMappedUnsubscribedOnEmpty() { } @Test - public void testFallbackHandler() { + void testFallbackHandler() { final Processor.Iso handler = create(); final String[] values = new String[2]; diff --git a/core/src/test/java/org/spongepowered/configurate/reactive/TransactionalProcessorTest.java b/core/src/test/java/org/spongepowered/configurate/reactive/TransactionalProcessorTest.java index e9de0c35c..f3a9de1d2 100644 --- a/core/src/test/java/org/spongepowered/configurate/reactive/TransactionalProcessorTest.java +++ b/core/src/test/java/org/spongepowered/configurate/reactive/TransactionalProcessorTest.java @@ -30,7 +30,7 @@ private Processor.TransactionalIso create() { } @Test - public void testTransaction() { + void testTransaction() { final Processor.TransactionalIso proc = create(); final SubscriberTransactionalTest subject = new SubscriberTransactionalTest(); @@ -41,7 +41,7 @@ public void testTransaction() { } @Test - public void testFailureRollsBack() { + void testFailureRollsBack() { final Processor.TransactionalIso proc = create(); final SubscriberTransactionalTest subject = new SubscriberTransactionalTest(); @@ -54,7 +54,7 @@ public void testFailureRollsBack() { } @Test - public void testFailurePreventsCommits() { + void testFailurePreventsCommits() { final Processor.TransactionalIso proc = create(); final SubscriberTransactionalTest subject1 = new SubscriberTransactionalTest(); final SubscriberTransactionalTest subject2 = new SubscriberTransactionalTest(); diff --git a/core/src/test/java/org/spongepowered/configurate/reference/WatchServiceListenerTest.java b/core/src/test/java/org/spongepowered/configurate/reference/WatchServiceListenerTest.java index f99f6d4c4..3b3496fdd 100644 --- a/core/src/test/java/org/spongepowered/configurate/reference/WatchServiceListenerTest.java +++ b/core/src/test/java/org/spongepowered/configurate/reference/WatchServiceListenerTest.java @@ -54,13 +54,13 @@ public static void tearDownClass() throws IOException { } @Test - public void testListenToRelativePath() throws IOException { + void testListenToRelativePath() throws IOException { // We test that this doesn't throw any exceptions listener.listenToFile(Paths.get("testfile.conf"), event -> {}).dispose(); } @Test - public void testListenToPath() throws IOException { + void testListenToPath() throws IOException { final Path tempFolder = Files.createTempDirectory("configurate-test"); final Path testFile = tempFolder.resolve("listenPath.txt"); Files.write(testFile, Collections.singleton("version one"), StandardOpenOption.SYNC, @@ -112,7 +112,7 @@ public void testListenToPath() throws IOException { @Test @Disabled - public void testListenToDirectory() throws IOException { + void testListenToDirectory() throws IOException { final Path tempFolder = Files.createTempDirectory("configurate-test"); final Path test1 = tempFolder.resolve("test1"); final Path test2 = tempFolder.resolve("test2"); diff --git a/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java b/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java index 5aff3deb9..7466937c9 100644 --- a/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java +++ b/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java @@ -42,7 +42,7 @@ private TypeSerializer getSerializer(final Class type) { .withNativeTypes(UnmodifiableCollections.toSet(Byte.class, Float.class, String.class, Integer.class, Long.class, Double.class))); @Test - public void testSerializeCustomNumber() { + void testSerializeCustomNumber() { final TypeToken customNumberType = TypeToken.get(CustomNumber.class); final @Nullable TypeSerializer serializer = TypeSerializerCollection.defaults().get(customNumberType); assertNull(serializer, "Type serializer for custom number class should be null!"); @@ -73,7 +73,7 @@ public double doubleValue() { } @Test - public void testByte() throws ObjectMappingException { + void testByte() throws ObjectMappingException { final TypeSerializer serializer = getSerializer(Byte.class); final byte b = (byte) 65; @@ -108,7 +108,7 @@ public void testByte() throws ObjectMappingException { } @Test - public void testShort() throws ObjectMappingException { + void testShort() throws ObjectMappingException { final TypeSerializer serializer = getSerializer(Short.class); final short b = (short) 32486; @@ -145,7 +145,7 @@ public void testShort() throws ObjectMappingException { } @Test - public void testInt() throws Exception { + void testInt() throws Exception { final TypeSerializer serializer = getSerializer(Integer.class); final int i = 48888333; @@ -188,7 +188,7 @@ public void testInt() throws Exception { } @Test - public void testLong() throws Exception { + void testLong() throws Exception { final TypeSerializer serializer = getSerializer(Long.class); final long i = 48888333494404L; @@ -219,7 +219,7 @@ public void testLong() throws Exception { } @Test - public void testFloat() throws Exception { + void testFloat() throws Exception { final TypeSerializer serializer = getSerializer(Float.class); final float i = 3.1415f; @@ -246,7 +246,7 @@ public void testFloat() throws Exception { } @Test - public void testDouble() throws Exception { + void testDouble() throws Exception { final TypeSerializer serializer = getSerializer(Double.class); final double i = 3.1415e180d; diff --git a/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializerCollectionTest.java b/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializerCollectionTest.java index 70e1fe183..707171581 100644 --- a/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializerCollectionTest.java +++ b/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializerCollectionTest.java @@ -32,7 +32,7 @@ public class TypeSerializerCollectionTest { @Test - public void testResolveWildcard() throws ObjectMappingException { + void testResolveWildcard() throws ObjectMappingException { final ConfigurationNode node = BasicConfigurationNode.root(ConfigurationOptions.defaults() .withSerializers(b -> b.register(Object.class, new PassthroughSerializer())), n -> { n.appendListNode().setValue("a string"); diff --git a/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java b/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java index b9677ce72..adcf7d4c7 100644 --- a/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java +++ b/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java @@ -68,7 +68,7 @@ private TypeSerializer getSerializer(final Class type) { } @Test - public void testStringSerializer() throws ObjectMappingException { + void testStringSerializer() throws ObjectMappingException { final TypeToken stringType = TypeToken.get(String.class); final TypeSerializer stringSerializer = getSerializer(stringType); final BasicConfigurationNode node = BasicConfigurationNode.root().setValue("foobar"); @@ -79,7 +79,7 @@ public void testStringSerializer() throws ObjectMappingException { } @Test - public void testAsBoolean() throws Exception { + void testAsBoolean() throws Exception { final boolean actual = true; final String[] trueEvaluating = new String[] {"true", "yes", "1", "t", "y"}; final String[] falseEvaluating = new String[] {"false", "no", "0", "f", "n"}; @@ -94,7 +94,7 @@ public void testAsBoolean() throws Exception { } @Test - public void testBooleanSerializer() throws ObjectMappingException { + void testBooleanSerializer() throws ObjectMappingException { final TypeToken booleanType = TypeToken.get(Boolean.class); final TypeSerializer booleanSerializer = getSerializer(booleanType); @@ -114,7 +114,7 @@ private enum TestEnum { } @Test - public void testEnumValueSerializer() throws ObjectMappingException { + void testEnumValueSerializer() throws ObjectMappingException { final TypeToken enumType = TypeToken.get(TestEnum.class); final TypeSerializer enumSerializer = getSerializer(enumType); @@ -136,7 +136,7 @@ public void testEnumValueSerializer() throws ObjectMappingException { } @Test - public void testListSerializer() throws ObjectMappingException { + void testListSerializer() throws ObjectMappingException { final TypeToken> stringListType = new TypeToken>() {}; final TypeSerializer> stringListSerializer = getSerializer(stringListType); final BasicConfigurationNode value = BasicConfigurationNode.root(); @@ -156,7 +156,7 @@ public void testListSerializer() throws ObjectMappingException { } @Test - public void testSetSerializer() throws ObjectMappingException { + void testSetSerializer() throws ObjectMappingException { final TypeToken> stringListType = new TypeToken>() {}; final TypeSerializer> stringListSerializer = getSerializer(stringListType); final BasicConfigurationNode value = BasicConfigurationNode.root(); @@ -177,7 +177,7 @@ public void testSetSerializer() throws ObjectMappingException { } @Test - public void testListSerializerPreservesEmptyList() throws ObjectMappingException { + void testListSerializerPreservesEmptyList() throws ObjectMappingException { final TypeToken> listStringType = new TypeToken>() {}; final TypeSerializer> listStringSerializer = getSerializer(listStringType); @@ -191,7 +191,7 @@ public void testListSerializerPreservesEmptyList() throws ObjectMappingException @Test @SuppressWarnings("rawtypes") - public void testListRawTypes() { + void testListRawTypes() { final TypeToken rawType = TypeToken.get(List.class); final TypeSerializer serial = getSerializer(rawType); @@ -207,7 +207,7 @@ public void testListRawTypes() { } @Test - public void testMapSerializer() throws ObjectMappingException { + void testMapSerializer() throws ObjectMappingException { final TypeToken> mapStringIntType = new TypeToken>() {}; final TypeSerializer> mapStringIntSerializer = getSerializer(mapStringIntType); @@ -230,7 +230,7 @@ public void testMapSerializer() throws ObjectMappingException { } @Test - public void testInvalidMapValueTypes() throws ObjectMappingException { + void testInvalidMapValueTypes() throws ObjectMappingException { final TypeToken> mapTestEnumIntType = new TypeToken>() {}; final TypeSerializer> mapTestEnumIntSerializer = getSerializer(mapTestEnumIntType); @@ -248,7 +248,7 @@ public void testInvalidMapValueTypes() throws ObjectMappingException { } @Test - public void testMapSerializerRemovesDeletedKeys() throws ObjectMappingException { + void testMapSerializerRemovesDeletedKeys() throws ObjectMappingException { final TypeToken> mapStringIntType = new TypeToken>() {}; final TypeSerializer> mapStringIntSerializer = getSerializer(mapStringIntType); @@ -267,7 +267,7 @@ public void testMapSerializerRemovesDeletedKeys() throws ObjectMappingException } @Test - public void testMapSerializerPreservesEmptyMap() throws ObjectMappingException { + void testMapSerializerPreservesEmptyMap() throws ObjectMappingException { final TypeToken> mapStringIntType = new TypeToken>() {}; final TypeSerializer> mapStringIntSerializer = getSerializer(mapStringIntType); @@ -280,7 +280,7 @@ public void testMapSerializerPreservesEmptyMap() throws ObjectMappingException { } @Test - public void testMapSerializerPreservesChildComments() throws ObjectMappingException { + void testMapSerializerPreservesChildComments() throws ObjectMappingException { final TypeToken> mapStringIntType = new TypeToken>() {}; final TypeSerializer> mapStringIntSerializer = getSerializer(mapStringIntType); @@ -303,7 +303,7 @@ private static class TestObject { } @Test - public void testAnnotatedObjectSerializer() throws ObjectMappingException { + void testAnnotatedObjectSerializer() throws ObjectMappingException { final TypeToken testNodeType = TypeToken.get(TestObject.class); final TypeSerializer testObjectSerializer = getSerializer(testNodeType); final BasicConfigurationNode node = BasicConfigurationNode.root(); @@ -316,7 +316,7 @@ public void testAnnotatedObjectSerializer() throws ObjectMappingException { } @Test - public void testUriSerializer() throws ObjectMappingException { + void testUriSerializer() throws ObjectMappingException { final TypeToken uriType = TypeToken.get(URI.class); final TypeSerializer uriSerializer = getSerializer(uriType); @@ -333,7 +333,7 @@ public void testUriSerializer() throws ObjectMappingException { } @Test - public void testUrlSerializer() throws ObjectMappingException, MalformedURLException { + void testUrlSerializer() throws ObjectMappingException, MalformedURLException { final TypeToken urlType = TypeToken.get(URL.class); final TypeSerializer urlSerializer = getSerializer(urlType); @@ -350,7 +350,7 @@ public void testUrlSerializer() throws ObjectMappingException, MalformedURLExcep } @Test - public void testUuidSerializer() throws ObjectMappingException { + void testUuidSerializer() throws ObjectMappingException { final TypeToken uuidType = TypeToken.get(UUID.class); final TypeSerializer uuidSerializer = getSerializer(uuidType); @@ -366,7 +366,7 @@ public void testUuidSerializer() throws ObjectMappingException { } @Test - public void testPatternSerializer() throws ObjectMappingException { + void testPatternSerializer() throws ObjectMappingException { final TypeToken patternType = TypeToken.get(Pattern.class); final TypeSerializer patternSerializer = getSerializer(patternType); @@ -379,7 +379,7 @@ public void testPatternSerializer() throws ObjectMappingException { } @Test - public void testCharSerializer() throws ObjectMappingException { + void testCharSerializer() throws ObjectMappingException { final TypeToken charType = TypeToken.get(Character.class); final TypeSerializer charSerializer = getSerializer(charType); @@ -399,7 +399,7 @@ public void testCharSerializer() throws ObjectMappingException { } @Test - public void testArraySerializer() throws ObjectMappingException { + void testArraySerializer() throws ObjectMappingException { final TypeToken arrayType = TypeToken.get(String[].class); final TypeSerializer arraySerializer = getSerializer(arrayType); @@ -411,7 +411,7 @@ public void testArraySerializer() throws ObjectMappingException { } @Test - public void testArraySerializerBooleanPrimitive() throws ObjectMappingException { + void testArraySerializerBooleanPrimitive() throws ObjectMappingException { final TypeToken booleanArrayType = TypeToken.get(boolean[].class); final TypeSerializer booleanArraySerializer = getSerializer(booleanArrayType); @@ -423,7 +423,7 @@ public void testArraySerializerBooleanPrimitive() throws ObjectMappingException } @Test - public void testArraySerializerBytePrimitive() throws ObjectMappingException { + void testArraySerializerBytePrimitive() throws ObjectMappingException { final TypeToken byteArrayType = TypeToken.get(byte[].class); final TypeSerializer byteArraySerializer = getSerializer(byteArrayType); @@ -435,7 +435,7 @@ public void testArraySerializerBytePrimitive() throws ObjectMappingException { } @Test - public void testArraySerializerCharPrimitive() throws ObjectMappingException { + void testArraySerializerCharPrimitive() throws ObjectMappingException { final Class charArrayType = char[].class; final TypeSerializer charArraySerializer = getSerializer(charArrayType); @@ -447,7 +447,7 @@ public void testArraySerializerCharPrimitive() throws ObjectMappingException { } @Test - public void testArraySerializerShortPrimitive() throws ObjectMappingException { + void testArraySerializerShortPrimitive() throws ObjectMappingException { final Class shortArrayType = short[].class; final TypeSerializer shortArraySerializer = getSerializer(shortArrayType); @@ -459,7 +459,7 @@ public void testArraySerializerShortPrimitive() throws ObjectMappingException { } @Test - public void testArraySerializerIntPrimitive() throws ObjectMappingException { + void testArraySerializerIntPrimitive() throws ObjectMappingException { final Class intArrayType = int[].class; final TypeSerializer intArraySerializer = getSerializer(intArrayType); @@ -471,7 +471,7 @@ public void testArraySerializerIntPrimitive() throws ObjectMappingException { } @Test - public void testArraySerializerLongPrimitive() throws ObjectMappingException { + void testArraySerializerLongPrimitive() throws ObjectMappingException { final Class longArrayType = long[].class; final TypeSerializer longArraySerializer = getSerializer(longArrayType); @@ -483,7 +483,7 @@ public void testArraySerializerLongPrimitive() throws ObjectMappingException { } @Test - public void testArraySerializerFloatPrimitive() throws ObjectMappingException { + void testArraySerializerFloatPrimitive() throws ObjectMappingException { final Class floatArrayType = float[].class; final TypeSerializer floatArraySerializer = getSerializer(floatArrayType); @@ -495,7 +495,7 @@ public void testArraySerializerFloatPrimitive() throws ObjectMappingException { } @Test - public void testArraySerializerDoublePrimitive() throws ObjectMappingException { + void testArraySerializerDoublePrimitive() throws ObjectMappingException { final Class doubleArrayType = double[].class; final TypeSerializer doubleArraySerializer = getSerializer(doubleArrayType); @@ -507,7 +507,7 @@ public void testArraySerializerDoublePrimitive() throws ObjectMappingException { } @Test - public void testConfigurationNodeSerializer() throws ObjectMappingException { + void testConfigurationNodeSerializer() throws ObjectMappingException { final Class nodeType = ConfigurationNode.class; final TypeSerializer nodeSerializer = getSerializer(nodeType); assertNotNull(nodeSerializer); @@ -530,7 +530,7 @@ public void testConfigurationNodeSerializer() throws ObjectMappingException { } @Test - public void testPathSerializer() throws ObjectMappingException { + void testPathSerializer() throws ObjectMappingException { final TypeSerializer pathSerializer = getSerializer(Path.class); assertNotNull(pathSerializer); @@ -545,7 +545,7 @@ public void testPathSerializer() throws ObjectMappingException { } @Test - public void testPathSerializerFromList() throws ObjectMappingException { + void testPathSerializerFromList() throws ObjectMappingException { final TypeSerializer pathSerializer = getSerializer(Path.class); assertNotNull(pathSerializer); @@ -558,7 +558,7 @@ public void testPathSerializerFromList() throws ObjectMappingException { } @Test - public void testFileSerializer() throws ObjectMappingException { + void testFileSerializer() throws ObjectMappingException { final TypeSerializer fileSerializer = getSerializer(File.class); assertNotNull(fileSerializer); diff --git a/core/src/test/java/org/spongepowered/configurate/transformation/ConfigurationTransformationTest.java b/core/src/test/java/org/spongepowered/configurate/transformation/ConfigurationTransformationTest.java index 3fa064edc..3d24239bb 100644 --- a/core/src/test/java/org/spongepowered/configurate/transformation/ConfigurationTransformationTest.java +++ b/core/src/test/java/org/spongepowered/configurate/transformation/ConfigurationTransformationTest.java @@ -36,7 +36,7 @@ private static Object[] arr(final Object... path) { } @Test - public void testComparator() { + void testComparator() { doTestComparator(BasicConfigurationNode.root()); } @@ -81,7 +81,7 @@ private > void doTestComparator(final T nod } @Test - public void testWildcardMatching() { + void testWildcardMatching() { final BasicConfigurationNode node = BasicConfigurationNode.root(); final List wildcardMatch = Arrays.asList( path("a", ConfigurationTransformation.WILDCARD_OBJECT, "c"), @@ -120,7 +120,7 @@ public void testWildcardMatching() { } @Test - public void testMoveNode() { + void testMoveNode() { final BasicConfigurationNode node = BasicConfigurationNode.root(); final Object nodeValue = new Object(); @@ -134,7 +134,7 @@ public void testMoveNode() { } @Test - public void testChainedTransformations() { + void testChainedTransformations() { final BasicConfigurationNode node = BasicConfigurationNode.root(); node.getNode("a").setValue("something?"); final List actualOutput = new ArrayList<>(); @@ -155,7 +155,7 @@ private > void transformChained(final List< } @Test - public void testMoveToBase() { + void testMoveToBase() { final BasicConfigurationNode node = BasicConfigurationNode.root(); node.getNode("sub", "key").setValue("value"); node.getNode("at-parent").setValue("until-change"); @@ -172,7 +172,7 @@ private > void transformMoveToBase(final T } @Test - public void testMoveStrategy() { + void testMoveStrategy() { final ConfigurationTransformation.Builder build = ConfigurationTransformation.builder() .addAction(path("one"), (inputPath, valueAtPath) -> arr("two")); final BasicConfigurationNode overwritten = createMoveNode(); @@ -194,7 +194,7 @@ private BasicConfigurationNode createMoveNode() { } @Test - public void testCorrectNodePassed() { + void testCorrectNodePassed() { final BasicConfigurationNode node = BasicConfigurationNode.root(); final BasicConfigurationNode child = node.getNode("childNode").setValue("something"); ConfigurationTransformation.builder() @@ -205,7 +205,7 @@ public void testCorrectNodePassed() { } @Test - public void testVersionedTransformation() { + void testVersionedTransformation() { final BasicConfigurationNode target = BasicConfigurationNode.root(); target.getNode("dummy").setValue("whatever"); final List updatedVersions = new ArrayList<>(); @@ -236,7 +236,7 @@ private > ConfigurationTransformation bu } @Test - public void testVersionedTransformationMoveChildToRoot() { + void testVersionedTransformationMoveChildToRoot() { final BasicConfigurationNode original = BasicConfigurationNode.root(b -> { b.getNode("test").act(t -> { t.getNode("calico").setValue("purr"); diff --git a/core/src/test/java/org/spongepowered/configurate/util/NamingSchemesTest.java b/core/src/test/java/org/spongepowered/configurate/util/NamingSchemesTest.java index 692b29544..a17afa899 100644 --- a/core/src/test/java/org/spongepowered/configurate/util/NamingSchemesTest.java +++ b/core/src/test/java/org/spongepowered/configurate/util/NamingSchemesTest.java @@ -23,61 +23,61 @@ public class NamingSchemesTest { @Test - public void testCamelCasePassthrough() { + void testCamelCasePassthrough() { assertEquals("camelCase", NamingSchemes.CAMEL_CASE.coerce("camelCase")); assertEquals("camels", NamingSchemes.CAMEL_CASE.coerce("camels")); } @Test - public void testSnakeCasePassthrough() { + void testSnakeCasePassthrough() { assertEquals("snake_case", NamingSchemes.SNAKE_CASE.coerce("snake_case")); assertEquals("snake", NamingSchemes.SNAKE_CASE.coerce("snake")); } @Test - public void testDashSeparatedPassthrough() { + void testDashSeparatedPassthrough() { assertEquals("dash-separated", NamingSchemes.LOWER_CASE_DASHED.coerce("dash-separated")); assertEquals("dash", NamingSchemes.LOWER_CASE_DASHED.coerce("dash")); } @Test - public void testCamelToSnake() { + void testCamelToSnake() { assertEquals("chat_radius", NamingSchemes.SNAKE_CASE.coerce("chatRadius")); assertEquals("max_growth_area", NamingSchemes.SNAKE_CASE.coerce("maxGrowthArea")); } @Test - public void testCamelToDashed() { + void testCamelToDashed() { assertEquals("quick-fix", NamingSchemes.LOWER_CASE_DASHED.coerce("quickFix")); assertEquals("lets-go-again", NamingSchemes.LOWER_CASE_DASHED.coerce("letsGoAgain")); } @Test - public void testSnakeToCamel() { + void testSnakeToCamel() { assertEquals("getDamageSource", NamingSchemes.CAMEL_CASE.coerce("get_damage_source")); assertEquals("setTarget", NamingSchemes.CAMEL_CASE.coerce("set_target")); } @Test - public void testSnakeToDashed() { + void testSnakeToDashed() { assertEquals("get-damage-source", NamingSchemes.LOWER_CASE_DASHED.coerce("get_damage_source")); assertEquals("set-target", NamingSchemes.LOWER_CASE_DASHED.coerce("set_target")); } @Test - public void testDashedToCamel() { + void testDashedToCamel() { assertEquals("nextTarget", NamingSchemes.CAMEL_CASE.coerce("next-target")); assertEquals("defaultSpawnPoint", NamingSchemes.CAMEL_CASE.coerce("default-spawn-point")); } @Test - public void testDashedToSnake() { + void testDashedToSnake() { assertEquals("next_target", NamingSchemes.SNAKE_CASE.coerce("next-target")); assertEquals("default_spawn_point", NamingSchemes.SNAKE_CASE.coerce("default-spawn-point")); } @Test - public void testLeadingDelimiterPassesThrough() { + void testLeadingDelimiterPassesThrough() { assertEquals("-days", NamingSchemes.SNAKE_CASE.coerce("-days")); assertEquals("-days", NamingSchemes.LOWER_CASE_DASHED.coerce("-days")); assertEquals("-days", NamingSchemes.CAMEL_CASE.coerce("-days")); @@ -87,7 +87,7 @@ public void testLeadingDelimiterPassesThrough() { } @Test - public void testTrailingDelimiterPassesThrough() { + void testTrailingDelimiterPassesThrough() { assertEquals("days-", NamingSchemes.LOWER_CASE_DASHED.coerce("days-")); assertEquals("days-", NamingSchemes.SNAKE_CASE.coerce("days-")); assertEquals("days-", NamingSchemes.CAMEL_CASE.coerce("days-")); @@ -97,7 +97,7 @@ public void testTrailingDelimiterPassesThrough() { } @Test - public void testAccents() { + void testAccents() { assertEquals("usingÜmlauts", NamingSchemes.CAMEL_CASE.coerce("using-ümlauts")); assertEquals("with_àccents", NamingSchemes.SNAKE_CASE.coerce("with-àccents")); assertEquals("with_àccents", NamingSchemes.SNAKE_CASE.coerce("withÀccents")); @@ -105,7 +105,7 @@ public void testAccents() { } @Test - public void testNonBmpCodePoints() { + void testNonBmpCodePoints() { assertEquals("using𝔐ath", NamingSchemes.CAMEL_CASE.coerce("using-𝔐ath")); assertEquals("asdf-𐐴hjkl", NamingSchemes.LOWER_CASE_DASHED.coerce("asdf𐐌hjkl")); } diff --git a/core/src/test/java14/org/spongepowered/configurate/objectmapping/RecordDiscovererTest.java b/core/src/test/java14/org/spongepowered/configurate/objectmapping/RecordDiscovererTest.java index 78eae87cf..3cca9fbce 100644 --- a/core/src/test/java14/org/spongepowered/configurate/objectmapping/RecordDiscovererTest.java +++ b/core/src/test/java14/org/spongepowered/configurate/objectmapping/RecordDiscovererTest.java @@ -37,7 +37,7 @@ record TestRecord(String name, int testable) { } @Test - public void testDeserializeToRecord() throws ObjectMappingException { + void testDeserializeToRecord() throws ObjectMappingException { final var node = BasicConfigurationNode.root(n -> { n.getNode("name").setValue("Hello"); n.getNode("testable").setValue(13); @@ -49,7 +49,7 @@ public void testDeserializeToRecord() throws ObjectMappingException { } @Test - public void testSerializeFromRecord() throws ObjectMappingException { + void testSerializeFromRecord() throws ObjectMappingException { final var record = new TestRecord("meow", 32); final var target = BasicConfigurationNode.root(); @@ -66,7 +66,7 @@ record AnnotatedRecord( ) {} @Test - public void testAnnotationsApplied() throws ObjectMappingException, MalformedURLException { + void testAnnotationsApplied() throws ObjectMappingException, MalformedURLException { final var record = new AnnotatedRecord(new TestRecord("nested", 0xFACE), new URL("https://spongepowered.org/")); diff --git a/extra/dfu3/src/test/java/org/spongepowered/configurate/extra/dfu/v3/ConfigurateOpsTests.java b/extra/dfu3/src/test/java/org/spongepowered/configurate/extra/dfu/v3/ConfigurateOpsTests.java index 7b49dc2c2..fdca339f6 100644 --- a/extra/dfu3/src/test/java/org/spongepowered/configurate/extra/dfu/v3/ConfigurateOpsTests.java +++ b/extra/dfu3/src/test/java/org/spongepowered/configurate/extra/dfu/v3/ConfigurateOpsTests.java @@ -88,7 +88,7 @@ private static V assertResult(final DataResult result) { @Test @DisplayName("Configurate (Empty) -> Gson (Null)") - public void emptyToGson() { + void emptyToGson() { final ConfigurationNode node = BasicConfigurationNode.root(); final Dynamic wrapped = new Dynamic<>(ConfigurateOps.getInstance(), node); final JsonElement element = wrapped.convert(JsonOps.INSTANCE).getValue(); @@ -98,7 +98,7 @@ public void emptyToGson() { @Test @DisplayName("Gson (Null) -> Configurate (Empty)") - public void emptyFromGson() { + void emptyFromGson() { final JsonNull jsonNull = JsonNull.INSTANCE; final Dynamic wrapped = new Dynamic<>(JsonOps.INSTANCE, jsonNull); final ConfigurationNode result = wrapped.convert(ConfigurateOps.getInstance()).getValue(); @@ -108,7 +108,7 @@ public void emptyFromGson() { @Test @DisplayName("Configurate (String) -> Gson") - public void toGsonFromString() { + void toGsonFromString() { final ConfigurationNode node = BasicConfigurationNode.root().setValue("Test String"); final Dynamic wrapped = new Dynamic<>(ConfigurateOps.getInstance(), node); final JsonElement output = wrapped.convert(JsonOps.INSTANCE).getValue(); @@ -120,7 +120,7 @@ public void toGsonFromString() { @Test @DisplayName("Gson (String) -> Configurate") - public void fromGsonFromString() { + void fromGsonFromString() { final JsonPrimitive string = new JsonPrimitive("Test String"); final Dynamic wrapped = new Dynamic<>(JsonOps.INSTANCE, string); final ConfigurationNode output = wrapped.convert(ConfigurateOps.getInstance()).getValue(); @@ -131,7 +131,7 @@ public void fromGsonFromString() { @Test @DisplayName("Gson (Integer Array) -> Configurate") - public void fromGsonFromList() { + void fromGsonFromList() { final List expectedElements = new ArrayList<>(); expectedElements.add(1); expectedElements.add(3); @@ -155,7 +155,7 @@ public void fromGsonFromList() { @Test @DisplayName("Configurate (Integer List) -> Gson") - public void toGsonFromList() { + void toGsonFromList() { final List expectedElements = new ArrayList<>(); expectedElements.add(1); expectedElements.add(3); @@ -178,7 +178,7 @@ public void toGsonFromList() { @Test @DisplayName("Gson (JsonObject) -> Configurate") - public void fromGsonToMap() throws ObjectMappingException { + void fromGsonToMap() throws ObjectMappingException { final Map expectedValues = new HashMap<>(); expectedValues.put("foo", "bar"); expectedValues.put("bar", "baz"); @@ -197,7 +197,7 @@ public void fromGsonToMap() throws ObjectMappingException { @Test @DisplayName("Configurate (Map) -> Gson") - public void toGsonFromMap() { + void toGsonFromMap() { final Map expectedValues = new HashMap<>(); expectedValues.put("foo", "bar"); expectedValues.put("bar", "baz"); @@ -213,7 +213,7 @@ public void toGsonFromMap() { } @Test - public void testCompressed() throws IOException { + void testCompressed() throws IOException { final TestRegistry positionRegistry = new TestRegistry<>(); positionRegistry.put("test1", new Vector3i(1, 2, 3)); positionRegistry.put("spawn", new Vector3i(32, 85, 884)); diff --git a/extra/dfu3/src/test/java/org/spongepowered/configurate/extra/dfu/v3/DfuSerializersTest.java b/extra/dfu3/src/test/java/org/spongepowered/configurate/extra/dfu/v3/DfuSerializersTest.java index 83d7cb752..d6e2f4fe0 100644 --- a/extra/dfu3/src/test/java/org/spongepowered/configurate/extra/dfu/v3/DfuSerializersTest.java +++ b/extra/dfu3/src/test/java/org/spongepowered/configurate/extra/dfu/v3/DfuSerializersTest.java @@ -61,7 +61,7 @@ public class DfuSerializersTest { }, vec -> IntStream.of(vec.getX(), vec.getY(), vec.getZ())); @Test - public void testCodecSerializer() throws ObjectMappingException { + void testCodecSerializer() throws ObjectMappingException { final TypeSerializerCollection serializers = TypeSerializerCollection.defaults().childBuilder() .register(VEC3I_TYPE, DfuSerializers.forCodec(VEC3I_CODEC)) .build(); @@ -88,7 +88,7 @@ static class TestSerializable { } @Test - public void testSerializerCodec() throws IOException { + void testSerializerCodec() throws IOException { final TypeSerializerCollection serializers = TypeSerializerCollection.defaults().childBuilder() .register(VEC3I_TYPE, DfuSerializers.forCodec(VEC3I_CODEC)) .build(); diff --git a/extra/dfu4/src/test/java/org/spongepowered/configurate/extra/dfu/v4/ConfigurateOpsTests.java b/extra/dfu4/src/test/java/org/spongepowered/configurate/extra/dfu/v4/ConfigurateOpsTests.java index b89a32487..d8b00aa83 100644 --- a/extra/dfu4/src/test/java/org/spongepowered/configurate/extra/dfu/v4/ConfigurateOpsTests.java +++ b/extra/dfu4/src/test/java/org/spongepowered/configurate/extra/dfu/v4/ConfigurateOpsTests.java @@ -88,7 +88,7 @@ private static V assertResult(final DataResult result) { @Test @DisplayName("Configurate (Empty) -> Gson (Null)") - public void emptyToGson() { + void emptyToGson() { final ConfigurationNode node = BasicConfigurationNode.root(); final Dynamic wrapped = new Dynamic<>(ConfigurateOps.getInstance(), node); final JsonElement element = wrapped.convert(JsonOps.INSTANCE).getValue(); @@ -98,7 +98,7 @@ public void emptyToGson() { @Test @DisplayName("Gson (Null) -> Configurate (Empty)") - public void emptyFromGson() { + void emptyFromGson() { final JsonNull jsonNull = JsonNull.INSTANCE; final Dynamic wrapped = new Dynamic<>(JsonOps.INSTANCE, jsonNull); final ConfigurationNode result = wrapped.convert(ConfigurateOps.getInstance()).getValue(); @@ -108,7 +108,7 @@ public void emptyFromGson() { @Test @DisplayName("Configurate (String) -> Gson") - public void toGsonFromString() { + void toGsonFromString() { final ConfigurationNode node = BasicConfigurationNode.root().setValue("Test String"); final Dynamic wrapped = new Dynamic<>(ConfigurateOps.getInstance(), node); final JsonElement output = wrapped.convert(JsonOps.INSTANCE).getValue(); @@ -120,7 +120,7 @@ public void toGsonFromString() { @Test @DisplayName("Gson (String) -> Configurate") - public void fromGsonFromString() { + void fromGsonFromString() { final JsonPrimitive string = new JsonPrimitive("Test String"); final Dynamic wrapped = new Dynamic<>(JsonOps.INSTANCE, string); final ConfigurationNode output = wrapped.convert(ConfigurateOps.getInstance()).getValue(); @@ -131,7 +131,7 @@ public void fromGsonFromString() { @Test @DisplayName("Gson (Integer Array) -> Configurate") - public void fromGsonFromList() { + void fromGsonFromList() { final List expectedElements = new ArrayList<>(); expectedElements.add(1); expectedElements.add(3); @@ -155,7 +155,7 @@ public void fromGsonFromList() { @Test @DisplayName("Configurate (Integer List) -> Gson") - public void toGsonFromList() { + void toGsonFromList() { final List expectedElements = new ArrayList<>(); expectedElements.add(1); expectedElements.add(3); @@ -178,7 +178,7 @@ public void toGsonFromList() { @Test @DisplayName("Gson (JsonObject) -> Configurate") - public void fromGsonToMap() throws ObjectMappingException { + void fromGsonToMap() throws ObjectMappingException { final Map expectedValues = new HashMap<>(); expectedValues.put("foo", "bar"); expectedValues.put("bar", "baz"); @@ -197,7 +197,7 @@ public void fromGsonToMap() throws ObjectMappingException { @Test @DisplayName("Configurate (Map) -> Gson") - public void toGsonFromMap() { + void toGsonFromMap() { final Map expectedValues = new HashMap<>(); expectedValues.put("foo", "bar"); expectedValues.put("bar", "baz"); @@ -213,7 +213,7 @@ public void toGsonFromMap() { } @Test - public void testCompressed() throws IOException { + void testCompressed() throws IOException { final TestRegistry positionRegistry = new TestRegistry<>(); positionRegistry.put("test1", new Vector3i(1, 2, 3)); positionRegistry.put("spawn", new Vector3i(32, 85, 884)); diff --git a/extra/dfu4/src/test/java/org/spongepowered/configurate/extra/dfu/v4/DfuSerializersTest.java b/extra/dfu4/src/test/java/org/spongepowered/configurate/extra/dfu/v4/DfuSerializersTest.java index b0d452a29..e5d1be6b7 100644 --- a/extra/dfu4/src/test/java/org/spongepowered/configurate/extra/dfu/v4/DfuSerializersTest.java +++ b/extra/dfu4/src/test/java/org/spongepowered/configurate/extra/dfu/v4/DfuSerializersTest.java @@ -61,7 +61,7 @@ public class DfuSerializersTest { }, vec -> IntStream.of(vec.getX(), vec.getY(), vec.getZ())); @Test - public void testCodecSerializer() throws ObjectMappingException { + void testCodecSerializer() throws ObjectMappingException { final TypeSerializerCollection serializers = TypeSerializerCollection.defaults().childBuilder() .register(VEC3I_TYPE, DfuSerializers.forCodec(VEC3I_CODEC)) .build(); @@ -88,7 +88,7 @@ static class TestSerializable { } @Test - public void testSerializerCodec() throws IOException { + void testSerializerCodec() throws IOException { final TypeSerializerCollection serializers = TypeSerializerCollection.defaults().childBuilder() .register(VEC3I_TYPE, DfuSerializers.forCodec(VEC3I_CODEC)) .build(); diff --git a/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java b/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java index dbb10527c..d491c586f 100644 --- a/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java +++ b/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java @@ -49,7 +49,7 @@ private ConfigClass(final String msg) { } @Test - public void testCreateGuiceObjectMapper() throws ObjectMappingException { + void testCreateGuiceObjectMapper() throws ObjectMappingException { final Injector injector = Guice.createInjector(new TestModule()); final GuiceObjectMapperProvider factory = injector.getInstance(GuiceObjectMapperProvider.class); final ObjectMapper mapper = factory.get().get(ConfigClass.class); diff --git a/format/gson/src/test/java/org/spongepowered/configurate/gson/GsonConfigurationLoaderTest.java b/format/gson/src/test/java/org/spongepowered/configurate/gson/GsonConfigurationLoaderTest.java index fd49bd016..19ad8b82e 100644 --- a/format/gson/src/test/java/org/spongepowered/configurate/gson/GsonConfigurationLoaderTest.java +++ b/format/gson/src/test/java/org/spongepowered/configurate/gson/GsonConfigurationLoaderTest.java @@ -47,7 +47,7 @@ public class GsonConfigurationLoaderTest { @Test - public void testSimpleLoading(final @TempDir Path tempDir) throws IOException { + void testSimpleLoading(final @TempDir Path tempDir) throws IOException { final URL url = getClass().getResource("/example.json"); final Path tempFile = tempDir.resolve("text1.txt"); final ConfigurationLoader loader = GsonConfigurationLoader.builder() @@ -64,7 +64,7 @@ public void testSimpleLoading(final @TempDir Path tempDir) throws IOException { } @Test - public void testSavingEmptyFile(final @TempDir Path tempDir) throws IOException { + void testSavingEmptyFile(final @TempDir Path tempDir) throws IOException { final File tempFile = tempDir.resolve("text2.txt").toFile(); tempFile.createNewFile(); @@ -77,7 +77,7 @@ public void testSavingEmptyFile(final @TempDir Path tempDir) throws IOException } @Test - public void testLoadingEmptyFile(final @TempDir Path tempDir) throws IOException { + void testLoadingEmptyFile(final @TempDir Path tempDir) throws IOException { final File tempFile = tempDir.resolve("text3.txt").toFile(); tempFile.createNewFile(); @@ -89,7 +89,7 @@ public void testLoadingEmptyFile(final @TempDir Path tempDir) throws IOException } @Test - public void testLoadingFileWithEmptyObject(final @TempDir Path tempDir) throws IOException { + void testLoadingFileWithEmptyObject(final @TempDir Path tempDir) throws IOException { final URL url = getClass().getResource("/emptyObject.json"); final Path tempFile = tempDir.resolve("text4.txt"); final ConfigurationLoader loader = GsonConfigurationLoader.builder() @@ -104,7 +104,7 @@ public void testLoadingFileWithEmptyObject(final @TempDir Path tempDir) throws I private static final long TEST_LONG_VAL = 584895858588588888L; @Test - public void testRoundtrippingLong(final @TempDir Path tempDir) throws IOException { + void testRoundtrippingLong(final @TempDir Path tempDir) throws IOException { final Path tempFile = tempDir.resolve("text5.txt"); final ConfigurationLoader loader = GsonConfigurationLoader.builder().setPath(tempFile).build(); final BasicConfigurationNode start = loader.createNode(); @@ -116,7 +116,7 @@ public void testRoundtrippingLong(final @TempDir Path tempDir) throws IOExceptio } @Test - public void testPrimitiveTypes(final @TempDir Path tempDir) throws IOException { + void testPrimitiveTypes(final @TempDir Path tempDir) throws IOException { final Path tempFile = tempDir.resolve("text6.txt"); final GsonConfigurationLoader loader = GsonConfigurationLoader.builder().setPath(tempFile).build(); final ConfigurationNode start = loader.createNode(); diff --git a/format/hocon/src/test/java/org/spongepowered/configurate/hocon/HoconConfigurationLoaderTest.java b/format/hocon/src/test/java/org/spongepowered/configurate/hocon/HoconConfigurationLoaderTest.java index 06d0b9ce4..579efe4be 100644 --- a/format/hocon/src/test/java/org/spongepowered/configurate/hocon/HoconConfigurationLoaderTest.java +++ b/format/hocon/src/test/java/org/spongepowered/configurate/hocon/HoconConfigurationLoaderTest.java @@ -52,7 +52,7 @@ public class HoconConfigurationLoaderTest { @Test - public void testSimpleLoading(final @TempDir Path tempDir) throws IOException { + void testSimpleLoading(final @TempDir Path tempDir) throws IOException { final URL url = getClass().getResource("/example.conf"); final Path saveTest = tempDir.resolve("text1.txt"); @@ -71,7 +71,7 @@ public void testSimpleLoading(final @TempDir Path tempDir) throws IOException { } @Test - public void testSplitLineCommentInput(final @TempDir Path tempDir) throws IOException { + void testSplitLineCommentInput(final @TempDir Path tempDir) throws IOException { final Path saveTo = tempDir.resolve("text2.txt"); final HoconConfigurationLoader loader = HoconConfigurationLoader.builder() .setPath(saveTo) @@ -85,7 +85,7 @@ public void testSplitLineCommentInput(final @TempDir Path tempDir) throws IOExce } @Test - public void testHeaderSaved(final @TempDir Path tempDir) throws IOException { + void testHeaderSaved(final @TempDir Path tempDir) throws IOException { final Path saveTo = tempDir.resolve("text3.txt"); final HoconConfigurationLoader loader = HoconConfigurationLoader.builder() .setPath(saveTo) @@ -101,7 +101,7 @@ public void testHeaderSaved(final @TempDir Path tempDir) throws IOException { } @Test - public void testBooleansNotShared(final @TempDir Path tempDir) throws IOException { + void testBooleansNotShared(final @TempDir Path tempDir) throws IOException { final URL url = getClass().getResource("/comments-test.conf"); final Path saveTo = tempDir.resolve("text4.txt"); final HoconConfigurationLoader loader = HoconConfigurationLoader.builder() @@ -118,19 +118,19 @@ public void testBooleansNotShared(final @TempDir Path tempDir) throws IOExceptio } @Test - public void testNewConfigObject() { + void testNewConfigObject() { final Map entries = ImmutableMap.of("a", ConfigValueFactory.fromAnyRef("hi"), "b", ConfigValueFactory.fromAnyRef("bye")); HoconConfigurationLoader.newConfigObject(entries); } @Test - public void testNewConfigList() { + void testNewConfigList() { final List entries = Arrays.asList(ConfigValueFactory.fromAnyRef("hello"), ConfigValueFactory.fromAnyRef("goodbye")); HoconConfigurationLoader.newConfigList(entries); } @Test - public void testRoundtripAndMergeEmpty(final @TempDir Path tempDir) throws IOException { + void testRoundtripAndMergeEmpty(final @TempDir Path tempDir) throws IOException { // https://github.com/SpongePowered/Configurate/issues/44 final URL rsrc = getClass().getResource("/empty-values.conf"); final Path output = tempDir.resolve("load-merge-empty.conf"); @@ -160,7 +160,7 @@ static class Section { } @Test - public void testCreateEmptyObjectmappingSection(final @TempDir Path tempDir) throws IOException, ObjectMappingException { + void testCreateEmptyObjectmappingSection(final @TempDir Path tempDir) throws IOException, ObjectMappingException { // https://github.com/SpongePowered/Configurate/issues/40 final URL rsrc = getClass().getResource("/empty-section.conf"); final Path output = tempDir.resolve("empty-section.conf"); diff --git a/format/jackson/src/test/java/org/spongepowered/configurate/jackson/JacksonConfigurationLoaderTest.java b/format/jackson/src/test/java/org/spongepowered/configurate/jackson/JacksonConfigurationLoaderTest.java index 48d8c7247..a9a88cfd0 100644 --- a/format/jackson/src/test/java/org/spongepowered/configurate/jackson/JacksonConfigurationLoaderTest.java +++ b/format/jackson/src/test/java/org/spongepowered/configurate/jackson/JacksonConfigurationLoaderTest.java @@ -45,7 +45,7 @@ public class JacksonConfigurationLoaderTest { @Test - public void testSimpleLoading(final @TempDir Path tempDir) throws IOException { + void testSimpleLoading(final @TempDir Path tempDir) throws IOException { final URL url = getClass().getResource("/example.json"); final Path tempFile = tempDir.resolve("text1.txt"); final ConfigurationLoader loader = JacksonConfigurationLoader.builder() @@ -77,12 +77,12 @@ private void testRoundtripValue(final Path tempDir, final Object value) throws I } @Test - public void testRoundtrippingLong(final @TempDir Path tempDir) throws IOException { + void testRoundtrippingLong(final @TempDir Path tempDir) throws IOException { testRoundtripValue(tempDir, TEST_LONG_VAL); } @Test - public void testRoundtripDouble(final @TempDir Path tempDir) throws IOException { + void testRoundtripDouble(final @TempDir Path tempDir) throws IOException { testRoundtripValue(tempDir, TEST_DOUBLE_VAL); } diff --git a/format/xml/src/test/java/org/spongepowered/configuate/xml/XmlConfigurationLoaderTest.java b/format/xml/src/test/java/org/spongepowered/configuate/xml/XmlConfigurationLoaderTest.java index 038419cd7..a204636b7 100644 --- a/format/xml/src/test/java/org/spongepowered/configuate/xml/XmlConfigurationLoaderTest.java +++ b/format/xml/src/test/java/org/spongepowered/configuate/xml/XmlConfigurationLoaderTest.java @@ -43,7 +43,7 @@ public class XmlConfigurationLoaderTest { @Test - public void testSimpleLoading(final @TempDir Path tempDir) throws IOException { + void testSimpleLoading(final @TempDir Path tempDir) throws IOException { final URL url = getClass().getResource("/example.xml"); final Path saveTest = tempDir.resolve("text1.txt"); @@ -91,7 +91,7 @@ public void testSimpleLoading(final @TempDir Path tempDir) throws IOException { } @Test - public void testExplicitTypes(final @TempDir Path tempDir) throws IOException { + void testExplicitTypes(final @TempDir Path tempDir) throws IOException { final URL url = getClass().getResource("/example2.xml"); final Path saveTest = tempDir.resolve("text2.txt"); @@ -122,7 +122,7 @@ public void testExplicitTypes(final @TempDir Path tempDir) throws IOException { } @Test - public void testComments(final @TempDir Path tempDir) throws IOException { + void testComments(final @TempDir Path tempDir) throws IOException { final URL url = getClass().getResource("/example3.xml"); final Path saveTest = tempDir.resolve("text3.txt"); @@ -145,7 +145,7 @@ public void testComments(final @TempDir Path tempDir) throws IOException { } @Test - public void testCommentsRoundtrip(final @TempDir Path tempDir) throws IOException { + void testCommentsRoundtrip(final @TempDir Path tempDir) throws IOException { final URL original = getClass().getResource("/example3.xml"); final Path destination = tempDir.resolve("test3-roundtrip.xml"); diff --git a/format/yaml/src/test/java/org/spongepowered/configurate/yaml/YamlConfigurationLoaderTest.java b/format/yaml/src/test/java/org/spongepowered/configurate/yaml/YamlConfigurationLoaderTest.java index 8f3924877..b44e0f759 100644 --- a/format/yaml/src/test/java/org/spongepowered/configurate/yaml/YamlConfigurationLoaderTest.java +++ b/format/yaml/src/test/java/org/spongepowered/configurate/yaml/YamlConfigurationLoaderTest.java @@ -37,7 +37,7 @@ public class YamlConfigurationLoaderTest { @Test - public void testSimpleLoading() throws IOException, ObjectMappingException { + void testSimpleLoading() throws IOException, ObjectMappingException { final URL url = getClass().getResource("/example.yml"); final ConfigurationLoader loader = YamlConfigurationLoader.builder() .setUrl(url).build(); @@ -53,7 +53,7 @@ public void testSimpleLoading() throws IOException, ObjectMappingException { } @Test - public void testReadWithTabs() throws IOException { + void testReadWithTabs() throws IOException { final ConfigurationNode expected = BasicConfigurationNode.root(n -> { n.getNode("document").act(d -> { d.getNode("we").setValue("support tabs");