package com.correx.infrastructure.workflow

import com.correx.core.transitions.conditions.TasksReady
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import kotlin.test.assertSame

class ConditionFactoryTest {

    @Test
    fun `tasks_ready maps to TasksReady`() {
        assertSame(TasksReady, ConditionSpec(type = "tasks_ready").toCondition())
    }

    @Test
    fun `unknown type rejected`() {
        assertThrows<WorkflowValidationException> { ConditionSpec(type = "nope").toCondition() }
    }
}
