Search in sources :

Example 1 with PokemonRepository

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

the class RaidRepositoryTest method setUp.

@Before
public void setUp() throws Exception {
    Utils.setClockService(clockService);
    gymRepository = TestServerMain.getGymRepositoryForConfig(localeService, serverConfigRepository);
    pokemonRepository = new PokemonRepository("/pokemons.csv", localeService);
    raidEntityRepository.deleteAllInBatch();
}
Also used : PokemonRepository(pokeraidbot.domain.pokemon.PokemonRepository) Before(org.junit.Before)

Example 2 with PokemonRepository

use of pokeraidbot.domain.pokemon.PokemonRepository 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 3 with PokemonRepository

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

the class RaidStatisticsTest method setUp.

@Before
public void setUp() throws Exception {
    clockService.setMockTime(currentTime);
    Utils.setClockService(clockService);
    gymRepository = TestServerMain.getGymRepositoryForConfig(localeService, serverConfigRepository);
    pokemonRepository = new PokemonRepository("/pokemons.csv", localeService);
}
Also used : PokemonRepository(pokeraidbot.domain.pokemon.PokemonRepository) Before(org.junit.Before)

Example 4 with PokemonRepository

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

the class RaidPokemonsTest method setUp.

@Before
public void setUp() throws Exception {
    UserConfigRepository userConfigRepository = Mockito.mock(UserConfigRepository.class);
    when(userConfigRepository.findOne(any(String.class))).thenReturn(null);
    localeService = new LocaleService("sv", userConfigRepository);
    pokemonRepository = new PokemonRepository("/pokemons.csv", localeService);
    strategyService = new PokemonRaidStrategyService(pokemonRepository);
}
Also used : UserConfigRepository(pokeraidbot.infrastructure.jpa.config.UserConfigRepository) PokemonRepository(pokeraidbot.domain.pokemon.PokemonRepository) LocaleService(pokeraidbot.domain.config.LocaleService) Before(org.junit.Before)

Example 5 with PokemonRepository

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

the class PokemonRepositoryTest method setUp.

@Before
public void setUp() throws Exception {
    UserConfigRepository userConfigRepository = Mockito.mock(UserConfigRepository.class);
    when(userConfigRepository.findOne(any(String.class))).thenReturn(null);
    localeService = new LocaleService("sv", userConfigRepository);
    pokemonRepository = new PokemonRepository("/pokemons.csv", localeService);
}
Also used : UserConfigRepository(pokeraidbot.infrastructure.jpa.config.UserConfigRepository) PokemonRepository(pokeraidbot.domain.pokemon.PokemonRepository) LocaleService(pokeraidbot.domain.config.LocaleService) Before(org.junit.Before)

Aggregations

PokemonRepository (pokeraidbot.domain.pokemon.PokemonRepository)6 Before (org.junit.Before)4 LocaleService (pokeraidbot.domain.config.LocaleService)3 UserConfigRepository (pokeraidbot.infrastructure.jpa.config.UserConfigRepository)2 Test (org.junit.Test)1 Pokemon (pokeraidbot.domain.pokemon.Pokemon)1