13
0
geforkt von Mirrors/Paper
Paper/src/test/java/org/bukkit/SoundTest.java

42 Zeilen
1.2 KiB
Java

package org.bukkit;
2016-02-29 22:32:46 +01:00
import net.minecraft.server.MinecraftKey;
import net.minecraft.server.SoundEffect;
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.*;
import org.bukkit.craftbukkit.CraftSound;
import org.junit.Test;
public class SoundTest {
@Test
public void testGetSound() {
for (Sound sound : Sound.values()) {
assertThat(sound.name(), CraftSound.getSound(sound), is(not(nullValue())));
}
}
2016-02-29 22:32:46 +01:00
@Test
public void testReverse() {
for (MinecraftKey effect : SoundEffect.a.keySet()) {
assertNotNull(effect + "", Sound.valueOf(effect.a().replace('.', '_').toUpperCase(java.util.Locale.ENGLISH)));
2016-02-29 22:32:46 +01:00
}
}
@Test
public void testCategory() {
for (SoundCategory category : SoundCategory.values()) {
assertNotNull(category + "", net.minecraft.server.SoundCategory.valueOf(category.name()));
}
}
@Test
public void testCategoryReverse() {
for (net.minecraft.server.SoundCategory category : net.minecraft.server.SoundCategory.values()) {
assertNotNull(category + "", SoundCategory.valueOf(category.name()));
}
}
}