Migration and Orientation
This docs site teaches the small runner / powerful expectation model.
The New Reading Rule
Read Testify like this:
-
runner decides control flow
resultshouldresultByshouldBy
-
expectation decides semantics
- equality
- equality by projection
- equality by projected key
- custom relations
- exception behavior
The Main Naming Shift
On the assertion side:
Assert.resultis the non-throwing structured pathAssert.shouldis the fail-fast path
On the property side:
Check.resultis the non-throwing structured pathCheck.shouldis the fail-fast pathCheck.resultBy/Check.shouldByare the advanced custom-property-builder escape hatches
Expectation-First Equality
Instead of growing the runner surface with many equality variants, semantics live in:
AssertExpectation.equalByAssertExpectation.equalByKeyAssertExpectation.equalWithCheckExpectation.equalByCheckExpectation.equalByKeyCheckExpectation.equalWith
That keeps the runner surface small and the DSL stable.
Operators Stay Thin
Operators are just fail-fast sugar:
|>?,=?,<?,?,^?on the Assert side|=>,|=>>,|?>on the Check side
If a test needs more explanation than the operator gives you, prefer the named API instead of inventing more punctuation.
Read The API Like This
When you see a Testify test, decode it in this order:
-
which runner is it using?
AssertorCheck
-
is it fail-fast or inspectable?
shouldorresult
-
what semantics are being applied?
- expectation builder or operator shorthand
-
is there any extra control?
configarbitraryresultBy/shouldBy- global
Testify.configure
That reading rule keeps the API small even when the behavior becomes powerful.
testify