Skip to content

Commit 2a34785

Browse files
committed
test(configurate): add test for alternate property format
1 parent 9f5d2c7 commit 2a34785

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

serializer-configurate4/src/test/java/net/kyori/adventure/serializer/configurate4/ComponentSerializerTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,4 +273,19 @@ void testPlayerProperties() {
273273
);
274274
}
275275

276+
@Test
277+
void testPlayerMapPropertyFormat() {
278+
assertEquals(
279+
Component.object(ObjectContents.playerHead()
280+
.profileProperty("textures", "cool_value")
281+
.build()),
282+
this.deserialize(this.node(n -> {
283+
final BasicConfigurationNode textures = n.node(ComponentTreeConstants.OBJECT_PLAYER)
284+
.node(ComponentTreeConstants.OBJECT_PLAYER_PROPERTIES)
285+
.node("textures");
286+
textures.appendListNode().raw("cool_value");
287+
textures.appendListNode().raw("cooler_value");
288+
}))
289+
);
290+
}
276291
}

0 commit comments

Comments
 (0)