use of no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider in project L4J8 by stelar7.
the class MatchListTest method testMatchlistAllLazy.
@Test
public void testMatchlistAllLazy() {
DataCall.setCacheProvider(new FileSystemCacheProvider());
DataCall.getCacheProvider().clear(URLEndpoint.V3_MATCHLIST);
for (int i = 0; i < Constants.TEST_ACCOUNT_IDS.length; i++) {
List<MatchReference> list = new MatchListBuilder().withAccountId(Constants.TEST_ACCOUNT_IDS[i]).withPlatform(Constants.TEST_PLATFORM[i]).getLazy();
Assert.assertTrue("LazyList loaded data?!", list.isEmpty());
list.get(51);
Assert.assertTrue("LazyList didnt load data?!", !list.isEmpty());
}
}
use of no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider in project L4J8 by stelar7.
the class MatchListTest method testMatchAndMatchList.
@Test
@Ignore
public void testMatchAndMatchList() {
DataCall.setCacheProvider(new FileSystemCacheProvider());
DataCall.setLogLevel(LogLevel.INFO);
// EnumSet.of(GameQueueType.TEAM_BUILDER_RANKED_SOLO);
Set<GameQueueType> queue = null;
// EnumSet.of(SeasonType.SEASON_2018);
Set<SeasonType> season = null;
// new HashSet<>(Collections.singletonList(40));
Set<Integer> champ = null;
// LocalDateTime.now().withHour(0).toEpochSecond(ZoneOffset.UTC) * 1000;//1481108400000L; // start of season 2017
Long beginTime = null;
// LocalDateTime.now().withHour(0).plusWeeks(1).toEpochSecond(ZoneOffset.UTC) * 1000; // 604800000 is one week in ms
Long endTime = null;
// 0;
Long beginIndex = null;
// 100;
Long endIndex = null;
MatchListBuilder builder = new MatchListBuilder();
Summoner sum = new SummonerBuilder().withPlatform(Platform.EUW1).withName("stelar7").get();
builder = builder.withPlatform(sum.getPlatform()).withAccountId(sum.getAccountId());
builder = builder.withBeginTime(beginTime).withEndTime(endTime);
builder = builder.withBeginIndex(beginIndex).withEndIndex(endIndex);
builder = builder.withQueues(queue).withSeasons(season).withChampions(champ);
LazyList<MatchReference> all = builder.getLazy();
MatchBuilder mb = new MatchBuilder();
TimelineBuilder tb = new TimelineBuilder();
for (MatchReference reference : all) {
Match detail = reference.getFullMatch();
}
}
use of no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider in project L4J8 by stelar7.
the class StaticTest method testLanguageStrings.
@Test
public void testLanguageStrings() {
DataCall.setCacheProvider(new FileSystemCacheProvider());
DataCall.setLogLevel(LogLevel.DEBUG);
Map<String, String> strings = api.getLanguageStrings(Platform.EUW1, null, null);
}
use of no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider in project L4J8 by stelar7.
the class StaticTest method testRuneSingle.
@Test
public void testRuneSingle() {
DataCall.setCacheProvider(new FileSystemCacheProvider());
DataCall.setLogLevel(LogLevel.DEBUG);
EnumSet<RuneDataFlags> dataFlags = EnumSet.of(RuneDataFlags.ALL, RuneDataFlags.IMAGE);
StaticRune rune = api.getRune(Platform.EUW1, 5023, dataFlags, null, null);
Assert.assertTrue("missing id?", rune.getId() == 5023);
Assert.assertTrue("missing stats?", rune.getStats() != null);
Assert.assertTrue("missing desc?", rune.getDescription() != null);
Assert.assertTrue("missing tags?", rune.getTags() != null);
Assert.assertTrue("missing image?", rune.getImage() != null);
Assert.assertTrue("missing sandesc?", rune.getSanitizedDescription() != null);
Assert.assertTrue("missing rune?", rune.getRune() != null);
Assert.assertTrue("missing name?", rune.getName() != null);
}
use of no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider in project L4J8 by stelar7.
the class StaticTest method testSummonerSpellList.
@Test
public void testSummonerSpellList() {
DataCall.setCacheProvider(new FileSystemCacheProvider());
DataCall.setLogLevel(LogLevel.DEBUG);
EnumSet<SpellDataFlags> dataFlags = EnumSet.of(SpellDataFlags.ALL, SpellDataFlags.IMAGE);
Map<Integer, StaticSummonerSpell> list = api.getSummonerSpells(Platform.EUN1, dataFlags, null, null);
}
Aggregations