use of pokeraidbot.infrastructure.jpa.config.UserConfigRepository in project pokeraidbot by magnusmickelsson.
the class GymRepositoryTest method setUp.
@Before
public void setUp() throws Exception {
UserConfigRepository userConfigRepository = mock(UserConfigRepository.class);
when(userConfigRepository.findOne(any(String.class))).thenReturn(null);
localeService = new LocaleService("sv", userConfigRepository);
final Config dalarnaConfig = new Config("dalarna", "dalarna");
when(SERVER_CONFIG_REPOSITORY.getConfigForServer("dalarna")).thenReturn(dalarnaConfig);
final Config uppsalaConfig = new Config("uppsala", "uppsala");
when(SERVER_CONFIG_REPOSITORY.getConfigForServer("uppsala")).thenReturn(uppsalaConfig);
final Config angelholmConfig = new Config("ängelholm", "ängelholm");
when(SERVER_CONFIG_REPOSITORY.getConfigForServer("ängelholm")).thenReturn(angelholmConfig);
final Config luleConfig = new Config("luleå", "luleå");
when(SERVER_CONFIG_REPOSITORY.getConfigForServer("luleå")).thenReturn(luleConfig);
final Config umeConfig = new Config("umeå", "umeå");
when(SERVER_CONFIG_REPOSITORY.getConfigForServer("umeå")).thenReturn(umeConfig);
final Config vannasConfig = new Config("vännäs", "vännäs");
when(SERVER_CONFIG_REPOSITORY.getConfigForServer("vännäs")).thenReturn(vannasConfig);
final Config lyckseleConfig = new Config("lycksele", "lycksele");
when(SERVER_CONFIG_REPOSITORY.getConfigForServer("lycksele")).thenReturn(lyckseleConfig);
final Config norrkopingConfig = new Config("norrköping", "norrköping");
when(SERVER_CONFIG_REPOSITORY.getConfigForServer("norrköping")).thenReturn(norrkopingConfig);
final Config trollhattanConfig = new Config("trollhättan", "trollhättan");
when(SERVER_CONFIG_REPOSITORY.getConfigForServer("trollhättan")).thenReturn(trollhattanConfig);
final Config helsingborgConfig = new Config("helsingborg", "helsingborg");
when(SERVER_CONFIG_REPOSITORY.getConfigForServer("helsingborg")).thenReturn(helsingborgConfig);
configMap = new HashMap<>();
configMap.put("dalarna", dalarnaConfig);
configMap.put("uppsala", uppsalaConfig);
configMap.put("ängelholm", angelholmConfig);
configMap.put("luleå", luleConfig);
configMap.put("umeå", umeConfig);
configMap.put("vännäs", vannasConfig);
configMap.put("norrköping", norrkopingConfig);
configMap.put("trollhättan", trollhattanConfig);
configMap.put("helsingborg", helsingborgConfig);
configMap.put("lycksele", lyckseleConfig);
when(SERVER_CONFIG_REPOSITORY.getAllConfig()).thenReturn(configMap);
repo = TestServerMain.getGymRepositoryForConfig(localeService, SERVER_CONFIG_REPOSITORY);
}
use of pokeraidbot.infrastructure.jpa.config.UserConfigRepository in project pokeraidbot by magnusmickelsson.
the class CounterTextFileParserText 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);
}
use of pokeraidbot.infrastructure.jpa.config.UserConfigRepository in project pokeraidbot by magnusmickelsson.
the class UtilsTest method before.
@BeforeClass
public static void before() {
userConfigRepository = mock(UserConfigRepository.class);
when(userConfigRepository.findOne(any(String.class))).thenReturn(null);
localeService = new LocaleService("sv", userConfigRepository);
}
use of pokeraidbot.infrastructure.jpa.config.UserConfigRepository in project pokeraidbot by magnusmickelsson.
the class LocaleServiceTest 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);
}
use of pokeraidbot.infrastructure.jpa.config.UserConfigRepository 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);
}
Aggregations