コード例 #1
0
 @Test
 public void simpleColorDarkAqua() {
   assertEquals(
       "bla " + ChatColor.DARK_AQUA + "bla", ColorParser.replaceColor("bla {DARK_AQUA}bla"));
   assertEquals(
       "bla " + ChatColor.DARK_AQUA + "bla", ColorParser.replaceColor("bla {DARK_CYAN}bla"));
 }
コード例 #2
0
 @Test
 public void simpleColorDarkPurple() {
   assertEquals(
       "bla " + ChatColor.DARK_PURPLE + "bla", ColorParser.replaceColor("bla {DARK_PURPLE}bla"));
   assertEquals(
       "bla " + ChatColor.DARK_PURPLE + "bla", ColorParser.replaceColor("bla {PURPLE}bla"));
 }
コード例 #3
0
 @Test
 public void simpleColorUnderline() {
   assertEquals(
       "bla " + ChatColor.UNDERLINE + "bla", ColorParser.replaceColor("bla {UNDERLINE}bla"));
   assertEquals(
       "bla " + ChatColor.UNDERLINE + "bla", ColorParser.replaceColor("bla {UNDERLINED}bla"));
 }
コード例 #4
0
 @Test
 public void simpleColorLightPurple() {
   assertEquals(
       "bla " + ChatColor.LIGHT_PURPLE + "bla", ColorParser.replaceColor("bla {LIGHT_PURPLE}bla"));
   assertEquals(
       "bla " + ChatColor.LIGHT_PURPLE + "bla", ColorParser.replaceColor("bla {PINK}bla"));
 }
コード例 #5
0
 @Test
 public void simpleColorGold() {
   assertEquals("bla " + ChatColor.GOLD + "bla", ColorParser.replaceColor("bla {GOLD}bla"));
 }
コード例 #6
0
 @Test
 public void preLastColorMulti() {
   assertEquals(
       ChatColor.GREEN + "bla " + ChatColor.RESET + "bla " + ChatColor.GREEN + "bla",
       ColorParser.replaceColor("{GREEN}bla {PRE_LAST}bla {PRE_LAST}bla"));
 }
コード例 #7
0
 @Test
 public void simpleColorYellow() {
   assertEquals("bla " + ChatColor.YELLOW + "bla", ColorParser.replaceColor("bla {YELLOW}bla"));
 }
コード例 #8
0
 @Test
 public void simpleColorRed() {
   assertEquals("bla " + ChatColor.RED + "bla", ColorParser.replaceColor("bla {RED}bla"));
 }
コード例 #9
0
 @Test
 public void simpleColorGreen() {
   assertEquals("bla " + ChatColor.GREEN + "bla", ColorParser.replaceColor("bla {GREEN}bla"));
   assertEquals(
       "bla " + ChatColor.GREEN + "bla", ColorParser.replaceColor("bla {BRIGHT_GREEN}bla"));
 }
コード例 #10
0
 @Test
 public void multiColor() {
   assertEquals(
       ChatColor.GREEN + "bla " + ChatColor.BLACK + "bla",
       ColorParser.replaceColor("{GREEN}bla {BLACK}bla"));
 }
コード例 #11
0
 @Test
 public void simpleColorReset() {
   assertEquals("bla " + ChatColor.RESET + "bla", ColorParser.replaceColor("bla {RESET}bla"));
   assertEquals(
       "bla " + ChatColor.RESET + "bla", ColorParser.replaceColor("bla {PLAIN_WHITE}bla"));
 }
コード例 #12
0
 @Test
 public void simpleColorItalic() {
   assertEquals("bla " + ChatColor.ITALIC + "bla", ColorParser.replaceColor("bla {ITALIC}bla"));
 }
コード例 #13
0
 @Test
 public void simpleColorStrikeThrough() {
   assertEquals(
       "bla " + ChatColor.STRIKETHROUGH + "bla",
       ColorParser.replaceColor("bla {STRIKETHROUGH}bla"));
 }
コード例 #14
0
 @Test
 public void simpleColorMagic() {
   assertEquals("bla " + ChatColor.MAGIC + "bla", ColorParser.replaceColor("bla {MAGIC}bla"));
   assertEquals("bla " + ChatColor.MAGIC + "bla", ColorParser.replaceColor("bla {RANDOM}bla"));
 }
コード例 #15
0
 @Test
 public void simpleColorWhite() {
   assertEquals("bla " + ChatColor.WHITE + "bla", ColorParser.replaceColor("bla {WHITE}bla"));
 }
コード例 #16
0
 @Test
 public void simpleColorDarkGray() {
   assertEquals(
       "bla " + ChatColor.DARK_GRAY + "bla", ColorParser.replaceColor("bla {DARK_GRAY}bla"));
 }
コード例 #17
0
 @Test
 public void simpleColorBlue() {
   assertEquals("bla " + ChatColor.BLUE + "bla", ColorParser.replaceColor("bla {BLUE}bla"));
 }
コード例 #18
0
 @Test
 public void simpleColorBlack() {
   assertEquals("bla " + ChatColor.BLACK + "bla", ColorParser.replaceColor("bla {BLACK}bla"));
 }
コード例 #19
0
 @Test
 public void simpleColorAqua() {
   assertEquals("bla " + ChatColor.AQUA + "bla", ColorParser.replaceColor("bla {AQUA}bla"));
   assertEquals("bla " + ChatColor.AQUA + "bla", ColorParser.replaceColor("bla {CYAN}bla"));
 }
コード例 #20
0
 @Test
 public void preLastColorLast() {
   assertEquals(
       ChatColor.GREEN + "bla " + ChatColor.BLACK + "bla " + ChatColor.GREEN + "bla",
       ColorParser.replaceColor("{GREEN}bla {BLACK}bla {PRE_LAST}bla"));
 }
コード例 #21
0
 @Test
 public void preLastColorFirst() {
   assertEquals(
       ChatColor.RESET + "bla " + ChatColor.BLACK + "bla " + ChatColor.WHITE + "bla",
       ColorParser.replaceColor("{PRE_LAST}bla {BLACK}bla {WHITE}bla"));
 }
コード例 #22
0
 @Test
 public void noColor() {
   assertEquals("bla bla", ColorParser.replaceColor("bla bla"));
 }