Skip to content

Commit c356c95

Browse files
committed
Fix ImageUtils test after robolectric update
1 parent 17078bd commit c356c95

File tree

1 file changed

+9
-8
lines changed
  • firebase-appdistribution/src/test/java/com/google/firebase/appdistribution/impl

1 file changed

+9
-8
lines changed

firebase-appdistribution/src/test/java/com/google/firebase/appdistribution/impl/ImageUtilsTest.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,15 @@ public void readScaledImage_negativeDimensions_throws() {
163163
}
164164

165165
@Test
166-
public void readScaledImage_doesntExist_returnsNull() throws IOException {
167-
Bitmap result =
168-
ImageUtils.readScaledImage(
169-
contentResolver,
170-
Uri.fromFile(new File("nonexistent.png")),
171-
TEST_SCREENSHOT_WIDTH / 4,
172-
TEST_SCREENSHOT_HEIGHT / 4);
173-
assertThat(result).isNull();
166+
public void readScaledImage_doesntExist_throws() throws IOException {
167+
assertThrows(
168+
IOException.class,
169+
() ->
170+
ImageUtils.readScaledImage(
171+
contentResolver,
172+
Uri.fromFile(new File("nonexistent.png")),
173+
TEST_SCREENSHOT_WIDTH / 4,
174+
TEST_SCREENSHOT_HEIGHT / 4));
174175
}
175176

176177
private static byte[] writeBitmapToByteArray() throws IOException {

0 commit comments

Comments
 (0)