epic-12: after epic audit and init commit

This commit is contained in:
2026-05-16 11:42:00 +04:00
commit c77277af0b
461 changed files with 28958 additions and 0 deletions
@@ -0,0 +1,50 @@
import com.correx.core.validation.approval.ApprovalTrigger
import com.correx.core.validation.model.ValidationIssue
import com.correx.core.validation.model.ValidationReport
import com.correx.core.validation.model.ValidationSection
import com.correx.core.validation.model.ValidationSeverity
import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.Assertions.assertNull
import org.junit.jupiter.api.Test
class ApprovalTriggerTest {
private val trigger = ApprovalTrigger()
@Test
fun `should trigger approval on error`() {
val report = ValidationReport(
sections = listOf(
ValidationSection(
name = "graph",
issues = listOf(
ValidationIssue(
code = "GRAPH_DANGLING_TRANSITION",
message = "error",
severity = ValidationSeverity.ERROR,
),
),
),
),
)
val result = trigger.evaluate(report)
assertNotNull(result)
}
@Test
fun `should not trigger approval on clean report`() {
val report = ValidationReport(
sections = listOf(
ValidationSection("graph", emptyList()),
),
)
val result = trigger.evaluate(report)
assertNull(result)
}
}