@@ -0,0 +1,3261 @@
+package com.tisawesomeness.minecord;%0A%0Aimport com.tisawesomeness.minecord.config.config.Config;%0Aimport com.tisawesomeness.minecord.testutil.Resources;%0A%0Aimport com.fasterxml.jackson.core.JsonProcessingException;%0Aimport org.junit.jupiter.api.BeforeAll;%0Aimport org.junit.jupiter.api.DisplayName;%0Aimport org.junit.jupiter.api.Test;%0Aimport org.junit.jupiter.params.ParameterizedTest;%0Aimport org.junit.jupiter.params.provider.Arguments;%0Aimport org.junit.jupiter.params.provider.MethodSource;%0A%0Aimport java.util.stream.Stream;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.junit.jupiter.params.provider.Arguments.arguments;%0A%0Apublic class PlaceholdersTest %7B%0A%0A    private static Config config;%0A    private static BotBranding branding = new BotBranding();%0A    private static BuildInfo buildInfo = BuildInfo.getInstance();%0A%0A    @BeforeAll%0A    private static void initConfig() throws JsonProcessingException %7B%0A        config = Resources.config();%0A    %7D%0A%0A    @ParameterizedTest(name = %22%7Bindex%7D ==%3E Placeholder %7B0%7D is replaced with %7B1%7D%22)%0A    @DisplayName(%22Placeholders by themselves are replaced%22)%0A    @MethodSource(%22placeholderProvider%22)%0A    public void testPlaceholders(String placeholder, String value) %7B%0A        assertThat(Placeholders.parseConstants(placeholder, config, branding)).isEqualTo(value);%0A    %7D%0A    @ParameterizedTest(name = %22%7Bindex%7D ==%3E Placeholder %7B0%7D is replaced with %7B1%7D%22)%0A    @DisplayName(%22Placeholders surrounded by other characters are replaced%22)%0A    @MethodSource(%22placeholderProvider%22)%0A    public void testPlaceholdersWithExtra(String placeholder, String value) %7B%0A        String input = %22%3E%22 + placeholder + %22%3C%22;%0A        String output = %22%3E%22 + value + %22%3C%22;%0A        assertThat(Placeholders.parseConstants(input, config, branding)).isEqualTo(output);%0A    %7D%0A    @Test%0A    @DisplayName(%22Multiple placeholders can be replaced in the same string%22)%0A    public void testMultiplePlaceholders() %7B%0A        String input = Placeholders.PREFIX + %22user %22 + Placeholders.AUTHOR_TAG;%0A        String output = config.getSettingsConfig().getDefaultPrefix() + %22user %22 + branding.getAuthorTag();%0A        assertThat(Placeholders.parseConstants(input, config, branding)).isEqualTo(output);%0A    %7D%0A%0A    private static Stream%3CArguments%3E placeholderProvider() %7B%0A        return Stream.of(%0A                arguments(Placeholders.AUTHOR, branding.getAuthor()),%0A                arguments(Placeholders.AUTHOR_TAG, branding.getAuthorTag()),%0A                arguments(Placeholders.INVITE, branding.getInvite()),%0A                arguments(Placeholders.HELP_SERVER, branding.getHelpServer()),%0A                arguments(Placeholders.WEBSITE, branding.getWebsite()),%0A                arguments(Placeholders.GITHUB, branding.getGithub()),%0A%0A                arguments(Placeholders.VERSION, buildInfo.version),%0A                arguments(Placeholders.JDA_VERSION, buildInfo.jdaVersion),%0A%0A                arguments(Placeholders.JAVA_VERSION, System.getProperty(%22java.version%22)),%0A                arguments(Placeholders.MC_VERSION, config.getSupportedMCVersion()),%0A                arguments(Placeholders.BOT_SHARDS, String.valueOf(config.getShardCount())),%0A                arguments(Placeholders.PREFIX, config.getSettingsConfig().getDefaultPrefix())%0A        );%0A    %7D%0A%0A%7D%0A

Test placeholders