From 03f12497b2c6f21c9c7f766dc7f85667cfb432b6 Mon Sep 17 00:00:00 2001 From: Wesley Wolfe Date: Wed, 26 Sep 2012 16:34:06 -0500 Subject: Map org.bukkit.Sound to String values for sending to client. This change was done to remove the internal sound names from the API. Along with moving the internal names into CraftBukkit, a unit test was added for any new sounds added in the API to assure they have a non-null mapping. --- src/test/java/org/bukkit/SoundTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/java/org/bukkit/SoundTest.java (limited to 'src/test/java/org/bukkit/SoundTest.java') diff --git a/src/test/java/org/bukkit/SoundTest.java b/src/test/java/org/bukkit/SoundTest.java new file mode 100644 index 00000000..ca45067f --- /dev/null +++ b/src/test/java/org/bukkit/SoundTest.java @@ -0,0 +1,17 @@ +package org.bukkit; + +import static org.junit.Assert.assertNotNull; + +import org.bukkit.craftbukkit.CraftSound; +import org.junit.Test; + + +public class SoundTest { + + @Test + public void testGetSound() { + for (Sound sound : Sound.values()) { + assertNotNull(sound.name(), CraftSound.getSound(sound)); + } + } +} -- cgit v1.2.3