Cleanup
This commit is contained in:
parent
62833c8bec
commit
cf8abae20c
1 changed files with 10 additions and 10 deletions
|
|
@ -62,7 +62,7 @@ class AndroidMediaPreProcessorTest {
|
||||||
/*
|
/*
|
||||||
val data = result.getOrThrow()
|
val data = result.getOrThrow()
|
||||||
assertThat(data.file.path).endsWith("image.png")
|
assertThat(data.file.path).endsWith("image.png")
|
||||||
val info = (data as MediaUploadInfo.Image)
|
val info = data as MediaUploadInfo.Image
|
||||||
assertThat(info.thumbnailFile).isNull() // TODO Check this
|
assertThat(info.thumbnailFile).isNull() // TODO Check this
|
||||||
assertThat(info.imageInfo).isEqualTo(
|
assertThat(info.imageInfo).isEqualTo(
|
||||||
ImageInfo(
|
ImageInfo(
|
||||||
|
|
@ -97,7 +97,7 @@ class AndroidMediaPreProcessorTest {
|
||||||
/*
|
/*
|
||||||
val data = result.getOrThrow()
|
val data = result.getOrThrow()
|
||||||
assertThat(data.file.path).endsWith("image.png")
|
assertThat(data.file.path).endsWith("image.png")
|
||||||
val info = (data as MediaUploadInfo.Image)
|
val info = data as MediaUploadInfo.Image
|
||||||
assertThat(info.thumbnailFile).isNull() // TODO Check this
|
assertThat(info.thumbnailFile).isNull() // TODO Check this
|
||||||
assertThat(info.imageInfo).isEqualTo(
|
assertThat(info.imageInfo).isEqualTo(
|
||||||
ImageInfo(
|
ImageInfo(
|
||||||
|
|
@ -126,7 +126,7 @@ class AndroidMediaPreProcessorTest {
|
||||||
compressIfPossible = false,
|
compressIfPossible = false,
|
||||||
).getOrThrow()
|
).getOrThrow()
|
||||||
assertThat(result.file.path).endsWith("image.png")
|
assertThat(result.file.path).endsWith("image.png")
|
||||||
val info = (result as MediaUploadInfo.Image)
|
val info = result as MediaUploadInfo.Image
|
||||||
assertThat(info.thumbnailFile).isNotNull()
|
assertThat(info.thumbnailFile).isNotNull()
|
||||||
assertThat(info.imageInfo).isEqualTo(
|
assertThat(info.imageInfo).isEqualTo(
|
||||||
ImageInfo(
|
ImageInfo(
|
||||||
|
|
@ -154,7 +154,7 @@ class AndroidMediaPreProcessorTest {
|
||||||
compressIfPossible = false,
|
compressIfPossible = false,
|
||||||
).getOrThrow()
|
).getOrThrow()
|
||||||
assertThat(result.file.path).endsWith("image.png")
|
assertThat(result.file.path).endsWith("image.png")
|
||||||
val info = (result as MediaUploadInfo.Image)
|
val info = result as MediaUploadInfo.Image
|
||||||
assertThat(info.thumbnailFile).isNotNull()
|
assertThat(info.thumbnailFile).isNotNull()
|
||||||
assertThat(info.imageInfo).isEqualTo(
|
assertThat(info.imageInfo).isEqualTo(
|
||||||
ImageInfo(
|
ImageInfo(
|
||||||
|
|
@ -183,14 +183,14 @@ class AndroidMediaPreProcessorTest {
|
||||||
compressIfPossible = true,
|
compressIfPossible = true,
|
||||||
).getOrThrow()
|
).getOrThrow()
|
||||||
assertThat(result.file.path).endsWith("animated_gif.gif")
|
assertThat(result.file.path).endsWith("animated_gif.gif")
|
||||||
val info = (result as MediaUploadInfo.Image)
|
val info = result as MediaUploadInfo.Image
|
||||||
assertThat(info.thumbnailFile).isNotNull()
|
assertThat(info.thumbnailFile).isNotNull()
|
||||||
assertThat(info.imageInfo).isEqualTo(
|
assertThat(info.imageInfo).isEqualTo(
|
||||||
ImageInfo(
|
ImageInfo(
|
||||||
height = 600,
|
height = 600,
|
||||||
width = 800,
|
width = 800,
|
||||||
mimetype = MimeTypes.Gif,
|
mimetype = MimeTypes.Gif,
|
||||||
size = 687979,
|
size = 687_979,
|
||||||
thumbnailInfo = ThumbnailInfo(height = 50, width = 50, mimetype = MimeTypes.Jpeg, size = 691),
|
thumbnailInfo = ThumbnailInfo(height = 50, width = 50, mimetype = MimeTypes.Jpeg, size = 691),
|
||||||
thumbnailSource = null,
|
thumbnailSource = null,
|
||||||
blurhash = "K00000fQfQfQfQfQfQfQfQ",
|
blurhash = "K00000fQfQfQfQfQfQfQfQ",
|
||||||
|
|
@ -211,7 +211,7 @@ class AndroidMediaPreProcessorTest {
|
||||||
compressIfPossible = true,
|
compressIfPossible = true,
|
||||||
).getOrThrow()
|
).getOrThrow()
|
||||||
assertThat(result.file.path).endsWith("text.txt")
|
assertThat(result.file.path).endsWith("text.txt")
|
||||||
val info = (result as MediaUploadInfo.AnyFile)
|
val info = result as MediaUploadInfo.AnyFile
|
||||||
assertThat(info.fileInfo).isEqualTo(
|
assertThat(info.fileInfo).isEqualTo(
|
||||||
FileInfo(
|
FileInfo(
|
||||||
mimetype = MimeTypes.PlainText,
|
mimetype = MimeTypes.PlainText,
|
||||||
|
|
@ -236,7 +236,7 @@ class AndroidMediaPreProcessorTest {
|
||||||
compressIfPossible = true,
|
compressIfPossible = true,
|
||||||
).getOrThrow()
|
).getOrThrow()
|
||||||
assertThat(result.file.path).endsWith("video.mp4")
|
assertThat(result.file.path).endsWith("video.mp4")
|
||||||
val info = (result as MediaUploadInfo.Video)
|
val info = result as MediaUploadInfo.Video
|
||||||
assertThat(info.thumbnailFile).isNotNull()
|
assertThat(info.thumbnailFile).isNotNull()
|
||||||
assertThat(info.videoInfo).isEqualTo(
|
assertThat(info.videoInfo).isEqualTo(
|
||||||
VideoInfo(
|
VideoInfo(
|
||||||
|
|
@ -265,7 +265,7 @@ class AndroidMediaPreProcessorTest {
|
||||||
compressIfPossible = false,
|
compressIfPossible = false,
|
||||||
).getOrThrow()
|
).getOrThrow()
|
||||||
assertThat(result.file.path).endsWith("video.mp4")
|
assertThat(result.file.path).endsWith("video.mp4")
|
||||||
val info = (result as MediaUploadInfo.Video)
|
val info = result as MediaUploadInfo.Video
|
||||||
assertThat(info.thumbnailFile).isNotNull()
|
assertThat(info.thumbnailFile).isNotNull()
|
||||||
assertThat(info.videoInfo).isEqualTo(
|
assertThat(info.videoInfo).isEqualTo(
|
||||||
VideoInfo(
|
VideoInfo(
|
||||||
|
|
@ -294,7 +294,7 @@ class AndroidMediaPreProcessorTest {
|
||||||
compressIfPossible = true,
|
compressIfPossible = true,
|
||||||
).getOrThrow()
|
).getOrThrow()
|
||||||
assertThat(result.file.path).endsWith("sample3s.mp3")
|
assertThat(result.file.path).endsWith("sample3s.mp3")
|
||||||
val info = (result as MediaUploadInfo.Audio)
|
val info = result as MediaUploadInfo.Audio
|
||||||
assertThat(info.audioInfo).isEqualTo(
|
assertThat(info.audioInfo).isEqualTo(
|
||||||
AudioInfo(
|
AudioInfo(
|
||||||
duration = Duration.ZERO, // Not available with Robolectric?
|
duration = Duration.ZERO, // Not available with Robolectric?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue