mirror of
https://github.com/usbharu/Hideout.git
synced 2026-09-30 08:51:11 +00:00
test: メディアアップロードのテストを追加
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
package dev.usbharu.hideout.core.service.media
|
||||
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
import kotlin.io.path.toPath
|
||||
|
||||
class ApatcheTikaFileTypeDeterminationServiceTest {
|
||||
@Test
|
||||
fun png() {
|
||||
val apatcheTikaFileTypeDeterminationService = ApatcheTikaFileTypeDeterminationService()
|
||||
|
||||
val mimeType = apatcheTikaFileTypeDeterminationService.fileType(
|
||||
String.javaClass.classLoader.getResource("400x400.png").toURI().toPath(), "400x400.png"
|
||||
)
|
||||
|
||||
assertThat(mimeType.type).isEqualTo("image")
|
||||
assertThat(mimeType.subtype).isEqualTo("png")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package dev.usbharu.hideout.core.service.media
|
||||
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class MediaServiceImplTest {
|
||||
@Test
|
||||
fun png画像をアップロードできる() {
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
Reference in New Issue
Block a user