use of net.kyori.adventure.text.minimessage.tag.resolver.ArgumentQueue in project adventure by KyoriPowered.
the class MiniMessageParserTest method invalidPreprocessTagNames.
@Test
void invalidPreprocessTagNames() {
final String input = "Some<##>of<>these<tag>are<3 >tags";
final Component expected = Component.text("Some<##>of<>these(meow)are<3 >tags");
final TagResolver alwaysMatchingResolver = new TagResolver() {
@Override
public Tag resolve(@NotNull final String name, @NotNull final ArgumentQueue arguments, @NotNull final Context ctx) throws ParsingException {
return Tag.preProcessParsed("(meow)");
}
@Override
public boolean has(@NotNull final String name) {
return true;
}
};
assertParsedEquals(expected, input, alwaysMatchingResolver);
}
Aggregations