Search in sources :

Example 1 with Player

use of com.faforever.client.api.dto.Player in project downlords-faf-client by FAForever.

the class FafServiceImplTest method createReview.

private Review createReview(String id, String text, int rating, Integer playerId) {
    Review review = new Review();
    review.setId(id);
    review.setText(text);
    review.setScore(rating);
    Optional.ofNullable(playerId).map(String::valueOf).ifPresent(s -> {
        com.faforever.client.player.Player player = new com.faforever.client.player.Player(s);
        player.setId(playerId);
        review.setPlayer(player);
    });
    return review;
}
Also used : Player(com.faforever.client.api.dto.Player) ModVersionReview(com.faforever.client.api.dto.ModVersionReview) MapVersionReview(com.faforever.client.api.dto.MapVersionReview) GameReview(com.faforever.client.api.dto.GameReview) Review(com.faforever.client.vault.review.Review)

Aggregations

GameReview (com.faforever.client.api.dto.GameReview)1 MapVersionReview (com.faforever.client.api.dto.MapVersionReview)1 ModVersionReview (com.faforever.client.api.dto.ModVersionReview)1 Player (com.faforever.client.api.dto.Player)1 Review (com.faforever.client.vault.review.Review)1