use of no.stelar7.api.r4j.pojo.lol.spectator.SpectatorGameInfo in project L4J8 by stelar7.
the class FeaturedGameTest method testCurrentGame.
@Test
public void testCurrentGame() {
final L4J8 l4j8 = new L4J8(SecretFile.CREDS);
SpectatorBuilder sb = new SpectatorBuilder().withPlatform(Platform.EUW1);
final List<SpectatorGameInfo> game = sb.getFeaturedGames();
doAssertions.accept(game);
}
use of no.stelar7.api.r4j.pojo.lol.spectator.SpectatorGameInfo in project L4J8 by stelar7.
the class FeaturedGameTest method testCurrentGame.
@Test
public void testCurrentGame() {
final R4J r4J = new R4J(SecretFile.CREDS);
SpectatorBuilder sb = new SpectatorBuilder().withPlatform(LeagueShard.EUW1);
final List<SpectatorGameInfo> game = sb.getFeaturedGames();
doAssertions.accept(game);
}
use of no.stelar7.api.r4j.pojo.lol.spectator.SpectatorGameInfo in project L4J8 by stelar7.
the class CurrentGameTest method testCurrentGame.
@Test
public void testCurrentGame() {
final L4J8 l4j8 = new L4J8(SecretFile.CREDS);
SpectatorBuilder sb = new SpectatorBuilder().withPlatform(Platform.EUW1);
// Get a game in progess
final List<SpectatorGameInfo> game = sb.getFeaturedGames();
// Get a summoner from that game
final String name = game.get(0).getParticipants().get(0).getSummonerName();
final Summoner sum = new SummonerBuilder().withPlatform(Constants.TEST_PLATFORM[0]).withName(name).get();
// Get game info
final SpectatorGameInfo currentGame = sb.withSummonerId(sum.getSummonerId()).getCurrentGame();
if (currentGame != null) {
doAssertions.accept(currentGame);
}
}
use of no.stelar7.api.r4j.pojo.lol.spectator.SpectatorGameInfo in project L4J8 by stelar7.
the class CurrentGameTest method testCurrentlyNotInGame.
@Test
public void testCurrentlyNotInGame() {
final L4J8 l4j8 = new L4J8(SecretFile.CREDS);
SpectatorBuilder sb = new SpectatorBuilder().withPlatform(Constants.TEST_PLATFORM[0]).withSummonerId(Constants.TEST_SUMMONER_IDS[0]);
SpectatorGameInfo game = sb.getCurrentGame();
System.out.format("%s is %sin game%n", Constants.TEST_SUMMONER_NAMES[0], game != null ? "" : "not ");
}
use of no.stelar7.api.r4j.pojo.lol.spectator.SpectatorGameInfo in project L4J8 by stelar7.
the class CurrentGameTest method testCurrentGameFame.
@Test
public void testCurrentGameFame() {
final R4J r4J = new R4J(SecretFile.CREDS);
Summoner s = Summoner.byName(LeagueShard.EUW1, "Klospülautomat");
SpectatorGameInfo game = s.getCurrentGame();
System.out.format("%s is %sin game%n", s.getName(), game != null ? "" : "not ");
}
Aggregations