package com.joe.camera.webcam.data

import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test

class MediaRepositoryTest {
    @Test fun `media constants preserve disguised extensions and real mime types`() {
        assertEquals("image/jpeg", MediaRepository.IMAGE_MIME)
        assertEquals("video/mp4", MediaRepository.VIDEO_MIME)
        assertEquals("application/octet-stream", MediaRepository.DISGUISED_VIDEO_MIME)
        assertTrue(MediaRepository.RELATIVE_DIR.endsWith("/jf"))
    }

    @Test fun `timestamp is sortable and filesystem safe`() {
        val value = MediaRepository.timestamp()
        assertEquals(17, value.length)
        assertTrue(value.all(Char::isDigit))
    }
}
