Simplicity is the ultimate sophistication Leonardo da Vinci
You write the rules, flows and stories.
Mock Test Connect
// the API: join a session's waitlist
$msg conf.waitlist.join (session, attendee) : (place)
// a rule: a full session takes a waitlist entry
$when conf.waitlist.join (session, attendee)
=> conf.seats.free (session)
=> (place = payload.waitlist + 1)
// smart mocks, by example
$mock conf.seats.free (session == "agents")
=> (payload = {free:0, waitlist:13})
$mock conf.seats.free (session == "keynote")
=> (payload = {free:12, waitlist:0})
// a story: the requirement is the test
$send conf.waitlist.join (session="agents", attendee="Ana")
$expect (place is 14)
$send conf.seats.free (session="keynote")
$expect (payload.free > 0)
Requirements, mocks and tests for APIs and microservices, in a wiki your team shares.
Enter classic diesel