Search in sources :

Example 11 with Pokemon

use of pokeraidbot.domain.pokemon.Pokemon in project pokeraidbot by magnusmickelsson.

the class PokemonRepositoryTest method testGetTyranitarWithFuzzySearch.

@Test
public void testGetTyranitarWithFuzzySearch() throws Exception {
    Pokemon pokemon = pokemonRepository.search("Tyranitar", null);
    assertThat(pokemon != null, is(true));
    assertThat(pokemon.getTypes(), is(new PokemonTypes("Dark", "Rock")));
    Pokemon search = pokemonRepository.search("Tryantar", null);
    assertThat(search, is(pokemon));
}
Also used : PokemonTypes(pokeraidbot.domain.pokemon.PokemonTypes) Pokemon(pokeraidbot.domain.pokemon.Pokemon) Test(org.junit.Test)

Example 12 with Pokemon

use of pokeraidbot.domain.pokemon.Pokemon in project pokeraidbot by magnusmickelsson.

the class UtilsTest method testPrintWeaknesses.

@Test
public void testPrintWeaknesses() throws Exception {
    PokemonRepository pokemonRepository = new PokemonRepository("/pokemons.csv", new LocaleService("sv", userConfigRepository));
    Pokemon pokemon = pokemonRepository.search("Tyranitar", null);
    assertThat(Utils.printWeaknesses(pokemon), is("Water, **Fighting**, Ground, Grass, Steel, Bug, Fairy"));
}
Also used : PokemonRepository(pokeraidbot.domain.pokemon.PokemonRepository) LocaleService(pokeraidbot.domain.config.LocaleService) Pokemon(pokeraidbot.domain.pokemon.Pokemon) Test(org.junit.Test)

Example 13 with Pokemon

use of pokeraidbot.domain.pokemon.Pokemon in project pokeraidbot by magnusmickelsson.

the class UtilsTest method testDoubleWeaknesses.

@Test
public void testDoubleWeaknesses() throws Exception {
    Pokemon pokemon;
    String typeToCheck;
    pokemon = pokemonRepository.search("Tyranitar", null);
    typeToCheck = "Fighting";
    assertPokemonIsDoubleWeakAgainst(pokemon, typeToCheck);
    pokemon = pokemonRepository.search("Articuno", null);
    typeToCheck = "Rock";
    assertPokemonIsDoubleWeakAgainst(pokemon, typeToCheck);
}
Also used : Pokemon(pokeraidbot.domain.pokemon.Pokemon) Test(org.junit.Test)

Example 14 with Pokemon

use of pokeraidbot.domain.pokemon.Pokemon in project pokeraidbot by magnusmickelsson.

the class PokemonRepositoryTest method testGetRaikouWithFuzzySearchFirstChars.

@Test
public void testGetRaikouWithFuzzySearchFirstChars() throws Exception {
    Pokemon pokemon = pokemonRepository.search("Raikou", null);
    assertThat(pokemon != null, is(true));
    assertThat(pokemon.getTypes(), is(new PokemonTypes("Electric")));
    Pokemon search = pokemonRepository.search("Raik", null);
    assertThat(search, is(pokemon));
    assertThat(pokemon.isEgg(), is(false));
}
Also used : PokemonTypes(pokeraidbot.domain.pokemon.PokemonTypes) Pokemon(pokeraidbot.domain.pokemon.Pokemon) Test(org.junit.Test)

Example 15 with Pokemon

use of pokeraidbot.domain.pokemon.Pokemon in project pokeraidbot by magnusmickelsson.

the class PokemonRepositoryTest method assertEggExistsForTier.

private void assertEggExistsForTier(String eggName, String eggSearchName, int eggTier) {
    Pokemon pokemon = pokemonRepository.search(eggName + eggTier, null);
    assertThat(pokemon != null, is(true));
    assertThat(pokemon.getTypes(), is(new PokemonTypes()));
    Pokemon search = pokemonRepository.search(eggSearchName + eggTier, null);
    assertThat(search, is(pokemon));
    assertThat(pokemon.isEgg(), is(true));
}
Also used : PokemonTypes(pokeraidbot.domain.pokemon.PokemonTypes) Pokemon(pokeraidbot.domain.pokemon.Pokemon)

Aggregations

Pokemon (pokeraidbot.domain.pokemon.Pokemon)22 Gym (pokeraidbot.domain.gym.Gym)11 User (net.dv8tion.jda.core.entities.User)10 Raid (pokeraidbot.domain.raid.Raid)10 LocalDateTime (java.time.LocalDateTime)6 Locale (java.util.Locale)6 UserMessedUpException (pokeraidbot.domain.errors.UserMessedUpException)6 Test (org.junit.Test)5 PokemonTypes (pokeraidbot.domain.pokemon.PokemonTypes)5 LocalTime (java.time.LocalTime)4 PokemonRaidInfo (pokeraidbot.domain.pokemon.PokemonRaidInfo)4 EmbedBuilder (net.dv8tion.jda.core.EmbedBuilder)3 MessageEmbed (net.dv8tion.jda.core.entities.MessageEmbed)3 RaidGroup (pokeraidbot.infrastructure.jpa.raid.RaidGroup)3 LocalDate (java.time.LocalDate)2 SignUp (pokeraidbot.domain.raid.signup.SignUp)2 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 SelfUser (net.dv8tion.jda.core.entities.SelfUser)1 GuildMessageReceivedEvent (net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent)1