package dev.kaizen.app

import dev.kaizen.app.ui.shape.KaizenShapes
import dev.kaizen.app.ui.shape.SquircleShape
import androidx.compose.ui.unit.dp
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.Test

class SquircleShapeTest {

    @Test
    fun `KaizenShapes has all expected tokens`() {
        assertNotNull(KaizenShapes.xs)
        assertNotNull(KaizenShapes.sm)
        assertNotNull(KaizenShapes.md)
        assertNotNull(KaizenShapes.lg)
        assertNotNull(KaizenShapes.xl)
        assertNotNull(KaizenShapes.pill)
        assertNotNull(KaizenShapes.circle)
    }

    @Test
    fun `KaizenShapes tokens are distinct instances`() {
        val shapes = listOf(
            KaizenShapes.xs, KaizenShapes.sm, KaizenShapes.md,
            KaizenShapes.lg, KaizenShapes.xl, KaizenShapes.pill,
        )
        val unique = shapes.toSet()
        assertEquals("All squircle shape tokens should be distinct", shapes.size, unique.size)
    }

    @Test
    fun `SquircleShape toString contains parameters`() {
        val shape = SquircleShape(radius = 16.dp, smoothness = 4.5f)
        val str = shape.toString()
        assertTrue("Should contain radius", str.contains("16"))
        assertTrue("Should contain smoothness", str.contains("4.5"))
    }

    @Test
    fun `SquircleShape with different smoothness creates different instances`() {
        val a = SquircleShape(radius = 16.dp, smoothness = 4.0f)
        val b = SquircleShape(radius = 16.dp, smoothness = 5.0f)
        assertTrue("Different smoothness should produce different toString", a.toString() != b.toString())
    }
}
