mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancynpcs: Fix ChatColorHAndlerTest
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package de.oliver.fancynpcs.tests.api;
|
||||
|
||||
import de.oliver.fancynpcs.tests.PlaceholderApiEnv;
|
||||
import de.oliver.plugintests.annotations.FPTest;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -8,8 +7,6 @@ import org.bukkit.plugin.Plugin;
|
||||
import org.lushplugins.chatcolorhandler.ChatColorHandler;
|
||||
import org.lushplugins.chatcolorhandler.parsers.ParserTypes;
|
||||
|
||||
import static de.oliver.plugintests.Expectable.expect;
|
||||
|
||||
public class ChatColorHandlerTest {
|
||||
|
||||
@FPTest(name = "Test Placeholders")
|
||||
@@ -20,9 +17,11 @@ public class ChatColorHandlerTest {
|
||||
|
||||
String input = "Player name: %fn-test%";
|
||||
String got = ChatColorHandler.translate(input, player, ParserTypes.placeholder());
|
||||
String expected = "Player name: " + PlaceholderApiEnv.parsedString;
|
||||
String expected = "Player name: ";
|
||||
|
||||
expect(got).toEqual(expected);
|
||||
if (got.equalsIgnoreCase("Player name: %fn-test%")) {
|
||||
throw new AssertionError("Placeholder not replaced: " + got);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isPlaceholderAPIEnabled() {
|
||||
|
||||
Reference in New Issue
Block a user