Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanPavilionG7 committed Nov 29, 2022
1 parent adbb334 commit 44ec85a
Showing 1 changed file with 3 additions and 7 deletions.
Expand Up @@ -20,7 +20,6 @@
import org.junit.jupiter.api.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.testfx.util.WaitForAsyncUtils;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand Down Expand Up @@ -89,7 +88,6 @@ public void setUp() throws Exception {
}
return instance;
});
verify(gameDetailController).setGame(null);
}

@Test
Expand All @@ -108,16 +106,14 @@ public void testSetSelectedGameDoesNotShowDetailPaneIfDisabled() {
}

@Test
public void testTiles() {
instance.tilesButton.fire();
WaitForAsyncUtils.waitForFxEvents();
public void testDisplayTiles() {
runOnFxThreadAndWait(() -> instance.tilesButton.fire());
verify(gamesTilesContainerController).createTiledFlowPane(games, instance.chooseSortingTypeChoiceBox);
}

@Test
public void testHideSidePane() {
instance.toggleGameDetailPaneButton.fire();
WaitForAsyncUtils.waitForFxEvents();
runOnFxThreadAndWait(() -> instance.toggleGameDetailPaneButton.fire());

assertFalse(preferencesService.getPreferences().isShowGameDetailsSidePane());
verify(preferencesService, atLeast(2)).storeInBackground();
Expand Down

0 comments on commit 44ec85a

Please sign in to comment.