diff options
author | md_5 <git@md-5.net> | 2017-05-28 11:00:02 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-05-28 11:00:02 +1000 |
commit | c037fe3d442702885d9c6bfa65621fb624210c02 (patch) | |
tree | 02869ffcc33d0ecda80e5f0b8a2ac1347f5f72db /src/test | |
parent | 44dd60ac27b4d48f612a4290f8bb4e7cc71b3003 (diff) | |
download | craftbukkit-c037fe3d442702885d9c6bfa65621fb624210c02.tar craftbukkit-c037fe3d442702885d9c6bfa65621fb624210c02.tar.gz craftbukkit-c037fe3d442702885d9c6bfa65621fb624210c02.tar.lz craftbukkit-c037fe3d442702885d9c6bfa65621fb624210c02.tar.xz craftbukkit-c037fe3d442702885d9c6bfa65621fb624210c02.zip |
Add color API for Teams
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))); + } + } +} |