diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/bukkit/ChatTest.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/ChatTest.java b/src/test/java/org/bukkit/ChatTest.java new file mode 100644 index 00000000..444ce6eb --- /dev/null +++ b/src/test/java/org/bukkit/ChatTest.java @@ -0,0 +1,22 @@ +package org.bukkit; + +import net.minecraft.server.EnumChatFormat; +import org.bukkit.craftbukkit.util.CraftChatMessage; +import org.junit.Assert; +import org.junit.Test; + +public class ChatTest { + + @Test + public void testColors() { + for (ChatColor color : ChatColor.values()) { + Assert.assertNotNull(CraftChatMessage.getColor(color)); + Assert.assertEquals(color, CraftChatMessage.getColor(CraftChatMessage.getColor(color))); + } + + for (EnumChatFormat format : EnumChatFormat.values()) { + Assert.assertNotNull(CraftChatMessage.getColor(format)); + Assert.assertEquals(format, CraftChatMessage.getColor(CraftChatMessage.getColor(format))); + } + } +} |