Search in sources :

Example 1 with SortConfig

use of com.faforever.client.vault.search.SearchController.SortConfig in project downlords-faf-client by FAForever.

the class SearchControllerTest method testSorting.

@Test
public void testSorting() throws Exception {
    instance.setSearchListener(searchListener);
    instance.queryTextField.setText("query");
    instance.sortOrderChoiceBox.getSelectionModel().select(SortOrder.ASC);
    instance.sortPropertyComboBox.getSelectionModel().select("game.title");
    instance.onSearchButtonClicked();
    SortConfig mapSortConfig = preferencesService.getPreferences().getVaultPrefs().getOnlineReplaySortConfig();
    assertEquals(mapSortConfig.getSortOrder(), SortOrder.ASC);
    verify(searchListener).accept(new SearchConfig(mapSortConfig, "query"));
}
Also used : SortConfig(com.faforever.client.vault.search.SearchController.SortConfig) SearchConfig(com.faforever.client.vault.search.SearchController.SearchConfig) Test(org.junit.Test) AbstractPlainJavaFxTest(com.faforever.client.test.AbstractPlainJavaFxTest)

Aggregations

AbstractPlainJavaFxTest (com.faforever.client.test.AbstractPlainJavaFxTest)1 SearchConfig (com.faforever.client.vault.search.SearchController.SearchConfig)1 SortConfig (com.faforever.client.vault.search.SearchController.SortConfig)1 Test (org.junit.Test)1