mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Forcing ImageKeys.hasImage to true in Mock objects!
The alternative case is covered by another specific testcase
This commit is contained in:
@@ -5,6 +5,7 @@ import forge.ImageKeys;
|
||||
import forge.Singletons;
|
||||
import forge.StaticData;
|
||||
import forge.gamesimulationtests.util.CardDatabaseHelper;
|
||||
import forge.item.PaperCard;
|
||||
import forge.localinstance.properties.ForgeConstants;
|
||||
import forge.localinstance.properties.ForgePreferences;
|
||||
import forge.model.FModel;
|
||||
@@ -133,6 +134,9 @@ public class ForgeCardMockTestCase extends PowerMockTestCase {
|
||||
PowerMockito.mockStatic(ImageKeys.class);
|
||||
initForgeConstants();
|
||||
|
||||
// Always Has Image (there is a separated test case to cover the opposite case)
|
||||
PowerMockito.when(ImageKeys.hasImage(Mockito.any(PaperCard.class))).thenReturn(false);
|
||||
|
||||
//Mocking some more static stuff
|
||||
PowerMockito.mockStatic(Singletons.class);
|
||||
PowerMockito.mockStatic(FModel.class);
|
||||
|
||||
Reference in New Issue
Block a user