mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-20 13:26:50 +00:00
[AB-205] making exception message for command not found configurable
making feature config classes more unified in the naming
This commit is contained in:
@@ -20,7 +20,7 @@ import org.mockito.junit.MockitoJUnitRunner;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import static dev.sheldan.abstracto.entertainment.config.EntertainmentFeature.ROLL_DEFAULT_HIGH_KEY;
|
||||
import static dev.sheldan.abstracto.entertainment.config.EntertainmentFeatureConfig.ROLL_DEFAULT_HIGH_KEY;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package dev.sheldan.abstracto.entertainment.service;
|
||||
|
||||
import dev.sheldan.abstracto.core.service.ConfigService;
|
||||
import dev.sheldan.abstracto.entertainment.config.EntertainmentFeature;
|
||||
import dev.sheldan.abstracto.entertainment.config.EntertainmentFeatureConfig;
|
||||
import net.dv8tion.jda.api.entities.Guild;
|
||||
import net.dv8tion.jda.api.entities.Member;
|
||||
import org.junit.Assert;
|
||||
@@ -79,7 +79,7 @@ public class EntertainmentServiceBeanTest {
|
||||
when(guild.getIdLong()).thenReturn(serverId);
|
||||
when(member.getGuild()).thenReturn(guild);
|
||||
Long sides = 6L;
|
||||
when(configService.getLongValue(EntertainmentFeature.ROULETTE_BULLETS_CONFIG_KEY, serverId)).thenReturn(sides);
|
||||
when(configService.getLongValue(EntertainmentFeatureConfig.ROULETTE_BULLETS_CONFIG_KEY, serverId)).thenReturn(sides);
|
||||
when(secureRandom.nextInt(sides.intValue())).thenReturn(randomValue);
|
||||
boolean shot = testUnit.executeRoulette(member);
|
||||
Assert.assertEquals(randomValue == 0, shot);
|
||||
|
||||
Reference in New Issue
Block a user