Skip to content

Commit

Permalink
Removed temporary yaml comment tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim203 committed Feb 11, 2024
1 parent 6c6f03c commit 63bbae7
Showing 1 changed file with 0 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,60 +184,6 @@ void testComplexKeys() throws ConfigurateException {
assertEquals("cat", node.node("mapping", Collections.singletonMap("name", "Meow")).getString());
}

@Test
void testRoundtripEssX(final @TempDir Path tempDir) throws IOException {
final URL source = this.resource("essx-example.yml");
final Path destination = tempDir.resolve("essx-example-roundtrip.yml");

final YamlConfigurationLoader loader = YamlConfigurationLoader.builder()
.path(destination)
.url(source)
.indent(2)
.nodeStyle(NodeStyle.BLOCK)
.build();

final ConfigurationNode sourceNode = loader.load();
loader.save(sourceNode);

assertContentsSame(source, destination);
}

@Test
void testRoundtripEssXLegacy(final @TempDir Path tempDir) throws IOException {
final URL source = this.resource("essx-legacy.yml");
final Path destination = tempDir.resolve("essx-legacy-roundtrip.yml");

final YamlConfigurationLoader loader = YamlConfigurationLoader.builder()
.path(destination)
.url(source)
.nodeStyle(NodeStyle.BLOCK)
.indent(2)
.build();

final ConfigurationNode sourceNode = loader.load();
loader.save(sourceNode);

assertContentsSame(source, destination);
}

@Test
void testRoundtripMobCleaner(final @TempDir Path tempDir) throws IOException {
final URL source = this.resource("mobcleaner-example.yml");
final Path destination = tempDir.resolve("mobcleaner-example-roundtrip.yml");

final YamlConfigurationLoader loader = YamlConfigurationLoader.builder()
.path(destination)
.url(source)
.indent(2)
.nodeStyle(NodeStyle.BLOCK)
.build();

final ConfigurationNode sourceNode = loader.load();
loader.save(sourceNode);

assertContentsSame(source, destination);
}

private URL resource(final String path) {
final @Nullable URL res = this.getClass().getResource(path);
if (res == null) {
Expand Down

0 comments on commit 63bbae7

Please sign in to comment.