package com.correx.testing.fixtures

import com.correx.core.events.types.StageId
import com.correx.core.events.types.TransitionId
import com.correx.core.transitions.graph.StageConfig
import com.correx.core.transitions.graph.TransitionEdge
import com.correx.core.transitions.graph.WorkflowGraph

object WorkflowFixtures {

    fun simpleGraph(): WorkflowGraph {
        val a = StageId("A")
        val b = StageId("B")

        val t1 = TransitionEdge(
            id = TransitionId("t1"),
            from = a,
            to = b,
            condition = { true }
        )

        return WorkflowGraph(
            id = "workflow-test",
            stages = mapOf(a to StageConfig(), b to StageConfig()),
            transitions = setOf(t1),
            start = a
        )
    }
}
