JPGs instead of LetterBitmap (robolectric missing Canvas support)

This commit is contained in:
FC Stegerman
2023-07-18 23:26:32 +02:00
parent 227f30361f
commit 22d671263a

View File

@@ -818,8 +818,9 @@ public class ImportExportTest {
@Test
public void exportImportV2Zip() throws FileNotFoundException {
// Prepare images
Bitmap bitmap1 = new LetterBitmap(activity.getApplicationContext(), "1", "1", 12, 64, 64, Color.BLACK, Color.YELLOW).getLetterTile();
Bitmap bitmap2 = new LetterBitmap(activity.getApplicationContext(), "2", "2", 12, 64, 64, Color.GREEN, Color.WHITE).getLetterTile();
// NB: we can't use LetterBitmap as robolectric doesn't support Canvas enough
Bitmap bitmap1 = BitmapFactory.decodeStream(getClass().getResourceAsStream("stocard-front.jpg"));
Bitmap bitmap2 = BitmapFactory.decodeStream(getClass().getResourceAsStream("stocard-back.jpg"));
// Set up cards and groups
HashMap<Integer, LoyaltyCard> loyaltyCardHashMap = new HashMap<>();