Write a scenario with a checkable expectation
Intention
Section titled “Intention”I want to keep the input, the question, and the expected answer as an executable scenario.
The rule and the test are different inputs to the test runner.
Incorrect form and why it stays silent
Section titled “Incorrect form and why it stays silent”A test without an expectation checks nothing.
test "подача" { given { assert filed(); } evaluate truth(registered());}Correct form
Section titled “Correct form”Minimal form for a scene:
language "law.core" version "0.2";package recipes.n.r11 version "0.1.0";namespace "urn:recipe:n-package:11";
relation filed();relation registered();rule Register strict { when filed(); then registered(); }Frozen execution scene
Section titled “Frozen execution scene”Two standalone scenes are kept here, one per file, so each scene has its own address.
| Facts | Question | Answer |
|---|---|---|
| filed() | registered() | TRUE_ONLY, Register applied |
| No filed() | registered() | NEITHER, Register not applied |
filing is recorded
test "filing is recorded" { given { context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00+05:00; knowledge_time @2026-09-13T09:00:00+05:00; timezone "Asia/Almaty"; } assert filed(); } evaluate truth(registered()); expect truth_status == TRUE_ONLY; expect applied(Register);}silent rule without filing
test "silent rule without filing" { given { context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00+05:00; knowledge_time @2026-09-13T09:00:00+05:00; timezone "Asia/Almaty"; }
} evaluate truth(registered()); expect truth_status == NEITHER; expect not applied(Register);}Counterfactual
Section titled “Counterfactual”teaches removes all expectations from the first test and checks LDC-E1316 at lower-test. The scene without a fact excludes a green test that accidentally got an answer from another input.
Boundary
Section titled “Boundary”The program is presented separately; given does not declare law.
Pitfall
Section titled “Pitfall”A test without expect and a lost expectation must fail. Here the same defect is held by the mutation of the first test.
Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.