use of com.faforever.client.rankedmatch.MatchmakerMessage in project downlords-faf-client by FAForever.
the class MainControllerTest method testOnMatchMakerMessageDisplaysNotificationWithQueuesButDisabled.
@Test
public void testOnMatchMakerMessageDisplaysNotificationWithQueuesButDisabled() {
@SuppressWarnings("unchecked") ArgumentCaptor<Consumer<MatchmakerMessage>> matchmakerMessageCaptor = ArgumentCaptor.forClass(Consumer.class);
when(notificationPrefs.getLadder1v1ToastEnabled()).thenReturn(false);
verify(gameService).addOnRankedMatchNotificationListener(matchmakerMessageCaptor.capture());
MatchmakerMessage matchmakerMessage = new MatchmakerMessage();
matchmakerMessage.setQueues(singletonList(new MatchmakerMessage.MatchmakerQueue("ladder1v1", singletonList(new RatingRange(1500, 1510)), singletonList(new RatingRange(1500, 1510)))));
matchmakerMessageCaptor.getValue().accept(matchmakerMessage);
verify(notificationService, never()).addNotification(any(TransientNotification.class));
}
Aggregations