use of no.stelar7.api.r4j.pojo.lol.summoner.Summoner in project L4J8 by stelar7.
the class SummonerTest method testByName.
@Test
public void testByName() {
String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
Summoner optional = new SummonerBuilder().withPlatform(s.getPlatform()).withName(s.getNormalizedName()).get();
doAssertions.accept(optional);
}
use of no.stelar7.api.r4j.pojo.lol.summoner.Summoner in project L4J8 by stelar7.
the class SummonerTest method testById.
@Test
public void testById() {
/*
Summoner ids have been removed from the spectator endpoint, so this test wont work anymore...
String id = new SpectatorBuilder().withPlatform(Platform.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerId();
Summoner s = new SummonerBuilder().withPlatform(Platform.EUW1).withSummonerId(id).get();
*/
String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
doAssertions.accept(s);
}
use of no.stelar7.api.r4j.pojo.lol.summoner.Summoner in project L4J8 by stelar7.
the class ChampionMasteryTest method testChampionMasteryAll.
@Test
public void testChampionMasteryAll() {
String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
List<ChampionMastery> all = new ChampionMasteryBuilder().withPlatform(s.getPlatform()).withSummonerId(s.getSummonerId()).getChampionMasteries();
assert all != null;
}
use of no.stelar7.api.r4j.pojo.lol.summoner.Summoner in project L4J8 by stelar7.
the class ChampionMasteryTest method testChampionMasteryTop.
@Test
public void testChampionMasteryTop() {
String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
List<ChampionMastery> all = new ChampionMasteryBuilder().withPlatform(s.getPlatform()).withSummonerId(s.getSummonerId()).getTopChampions(null);
assert all != null;
}
use of no.stelar7.api.r4j.pojo.lol.summoner.Summoner in project L4J8 by stelar7.
the class ChampionMasteryTest method testChampionMastery.
@Test
public void testChampionMastery() {
String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
ChampionMastery mastery;
ChampionMasteryBuilder bu = new ChampionMasteryBuilder().withPlatform(s.getPlatform()).withSummonerId(s.getSummonerId());
mastery = bu.withChampionId(1).getChampionMastery();
assert mastery != null;
mastery = bu.withChampionId(2).getChampionMastery();
assert mastery != null;
}
Aggregations