Search in sources :

Example 51 with Player

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

the class ReplayDetailControllerTest method setUp.

@Before
public void setUp() throws Exception {
    instance = new ReplayDetailController(timeService, i18n, uiService, replayService, ratingService, mapService, playerService, reviewService, clientProperties);
    when(reviewsController.getRoot()).thenReturn(new Pane());
    when(playerService.getCurrentPlayer()).thenReturn(Optional.of(new Player("junit")));
    loadFxml("theme/vault/replay/replay_detail.fxml", param -> {
        if (param == ReviewsController.class) {
            return reviewsController;
        }
        if (param == StarsController.class) {
            return starsController;
        }
        if (param == StarController.class) {
            return starController;
        }
        if (param == ReviewController.class) {
            return reviewController;
        }
        return instance;
    });
    assertThat(instance.moreInformationPane.isVisible(), is(false));
    assertThat(instance.moreInformationPane.isManaged(), is(false));
}
Also used : Player(com.faforever.client.player.Player) Pane(javafx.scene.layout.Pane) Before(org.junit.Before)

Aggregations

Player (com.faforever.client.player.Player)51 AbstractPlainJavaFxTest (com.faforever.client.test.AbstractPlainJavaFxTest)17 Test (org.junit.Test)17 Pane (javafx.scene.layout.Pane)8 I18n (com.faforever.client.i18n.I18n)7 PlayerService (com.faforever.client.player.PlayerService)7 UiService (com.faforever.client.theme.UiService)7 ClientProperties (com.faforever.client.config.ClientProperties)6 Controller (com.faforever.client.fx.Controller)6 ArrayList (java.util.ArrayList)6 Platform (javafx.application.Platform)6 Node (javafx.scene.Node)6 Scope (org.springframework.context.annotation.Scope)6 Component (org.springframework.stereotype.Component)6 JavaFxUtil (com.faforever.client.fx.JavaFxUtil)5 NotificationService (com.faforever.client.notification.NotificationService)5 TimeService (com.faforever.client.util.TimeService)5 Collection (java.util.Collection)5 List (java.util.List)5 Map (java.util.Map)5